vim-patch:9.0.0751: 'scrolloff' does not work well with 'smoothscroll'

Problem:    'scrolloff' does not work well with 'smoothscroll'.
Solution:   Make positioning the cursor a bit better.  Rename functions.

c9121f798f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Luuk van Baal
2023-04-27 00:03:46 +02:00
parent 223c7173ee
commit c426f7a622
7 changed files with 52 additions and 25 deletions

View File

@@ -193,7 +193,7 @@ static void insert_enter(InsertState *s)
}
}
Insstart_textlen = (colnr_T)linetabsize(get_cursor_line_ptr());
Insstart_textlen = linetabsize_str(get_cursor_line_ptr());
Insstart_blank_vcol = MAXCOL;
if (!did_ai) {
@@ -2251,7 +2251,7 @@ int stop_arrow(void)
// right, except when nothing was inserted yet.
update_Insstart_orig = false;
}
Insstart_textlen = (colnr_T)linetabsize(get_cursor_line_ptr());
Insstart_textlen = linetabsize_str(get_cursor_line_ptr());
if (u_save_cursor() == OK) {
arrow_used = false;