diff options
author | luukvbaal <luukvbaal@gmail.com> | 2023-10-29 00:05:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-29 06:05:29 +0800 |
commit | f2fb05238ad55586e26289a27f2af519e24f94f5 (patch) | |
tree | d9735c615487bceb2c75645ced5e46441ff705e8 /test/old/testdir | |
parent | 4f526b9fd864acbba9665e5a71787fc1c958d82c (diff) | |
download | rneovim-f2fb05238ad55586e26289a27f2af519e24f94f5.tar.gz rneovim-f2fb05238ad55586e26289a27f2af519e24f94f5.tar.bz2 rneovim-f2fb05238ad55586e26289a27f2af519e24f94f5.zip |
vim-patch:9.0.2081: smoothscroll may result in wrong cursor position (#25815)
Problem: With 'smoothscroll' set, "w_skipcol" is not reset when unsetting 'wrap'.
Resulting in incorrect calculation of the cursor position.
Solution: Reset "w_skipcol" when unsetting 'wrap'.
fixes: vim/vim#12970
closes: vim/vim#13439
https://github.com/vim/vim/commit/1bf1bf569b96d2f9b28e0cce0968ffbf2fb80aac
Diffstat (limited to 'test/old/testdir')
-rw-r--r-- | test/old/testdir/test_options.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim index 418aa81939..d69828dc2e 100644 --- a/test/old/testdir/test_options.vim +++ b/test/old/testdir/test_options.vim @@ -2193,4 +2193,20 @@ func Test_binary_depending_options() call delete('Xoutput_bin') endfunc +func Test_set_wrap() + " Unsetting 'wrap' when 'smoothscroll' is set does not result in incorrect + " cursor position. + set wrap smoothscroll scrolloff=5 + + call setline(1, ['', 'aaaa'->repeat(500)]) + 20 split + 20 vsplit + norm 2G$ + redraw + set nowrap + call assert_equal(2, winline()) + + set wrap& smoothscroll& scrolloff& +endfunc + " vim: shiftwidth=2 sts=2 expandtab |