diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-04-27 00:03:46 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2023-05-02 13:11:47 +0200 |
commit | c426f7a6228cb82af0f75ac4f2421543408ff091 (patch) | |
tree | 261fb3c753c16a2b36f1b1a50c84602aaa34b79e /src/nvim/edit.c | |
parent | 223c7173eea2a4abec75611bd70051ea0b4c5d20 (diff) | |
download | rneovim-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/edit.c')
-rw-r--r-- | src/nvim/edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 18434ad69f..2078fc4251 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -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; |