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

@@ -346,10 +346,8 @@ static int linelen(int *has_tab)
last > first && ascii_iswhite(last[-1]); last--) {}
char save = *last;
*last = NUL;
// Get line length.
len = linetabsize(line);
// Check for embedded TAB.
if (has_tab != NULL) {
len = linetabsize_str(line); // Get line length.
if (has_tab != NULL) { // Check for embedded TAB.
*has_tab = vim_strchr(first, TAB) != NULL;
}
*last = save;