0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1309: scrolling two lines with even line count and 'scrolloff' set

Problem:    Scrolling two lines with even line count and 'scrolloff' set.
Solution:   Adjust how the topline is computed. (closes #10545)
This commit is contained in:
Bram Moolenaar
2023-02-14 17:41:20 +00:00
parent 1a6476428f
commit 1d6539cf36
11 changed files with 92 additions and 54 deletions

View File

@@ -1953,7 +1953,7 @@ enter_buffer(buf_T *buf)
maketitle();
// when autocmds didn't change it
if (curwin->w_topline == 1 && !curwin->w_topline_was_set)
scroll_cursor_halfway(FALSE); // redisplay at correct position
scroll_cursor_halfway(FALSE, FALSE); // redisplay at correct position
#ifdef FEAT_NETBEANS_INTG
// Send fileOpened event because we've changed buffers.