aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-04-27 00:03:46 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2023-05-02 13:11:47 +0200
commitc426f7a6228cb82af0f75ac4f2421543408ff091 (patch)
tree261fb3c753c16a2b36f1b1a50c84602aaa34b79e /src/nvim/ex_cmds.c
parent223c7173eea2a4abec75611bd70051ea0b4c5d20 (diff)
downloadrneovim-c426f7a6228cb82af0f75ac4f2421543408ff091.tar.gz
rneovim-c426f7a6228cb82af0f75ac4f2421543408ff091.tar.bz2
rneovim-c426f7a6228cb82af0f75ac4f2421543408ff091.zip
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. https://github.com/vim/vim/commit/c9121f798f49fa71e814912cb186d89c164090c3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index f276e8ae24..2c31f742c3 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -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;