• Noam Postavsky's avatar
    Refactor uses of scroll_margin to a function · d17e92da
    Noam Postavsky authored
    Its effective range needs to be clamped between 0 and (window height /
    4), so it's better to have this constraint in a single place.
    
    * src/window.c (window_scroll_margin): New function.
    (window_scroll_pixel_based, window_scroll_line_based):
    (Frecenter, Fmove_to_window_line):
    * src/xdisp.c (try_scrolling, try_cursor_movement):
    (redisplay_window, try_window, try_window_id): Use it.
    d17e92da
xdisp.c 992 KB