diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-05-06 19:24:45 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2023-05-07 00:38:45 +0200 |
commit | 8e74569d7ee170b8661bdc74d61cf6be95303060 (patch) | |
tree | 024921e7f0be9c6779d9e3da28b23a1e16fcfae0 /test/functional/legacy/window_cmd_spec.lua | |
parent | 3b2bd8d69e6c0a173562778fae6ece67d9adf52c (diff) | |
download | rneovim-8e74569d7ee170b8661bdc74d61cf6be95303060.tar.gz rneovim-8e74569d7ee170b8661bdc74d61cf6be95303060.tar.bz2 rneovim-8e74569d7ee170b8661bdc74d61cf6be95303060.zip |
vim-patch:9.0.1513: text scrolls unnecessarily when splitting
Problem: Text scrolls unnecessarily when splitting and 'splitkeep' is not
"cursor".
Solution: Avoid resetting w_skipcol. (Luuk van Baal, closes vim/vim#12334)
https://github.com/vim/vim/commit/b926bf47d61360a4ec5e4867714a08d70fd49965
Diffstat (limited to 'test/functional/legacy/window_cmd_spec.lua')
-rw-r--r-- | test/functional/legacy/window_cmd_spec.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/legacy/window_cmd_spec.lua b/test/functional/legacy/window_cmd_spec.lua index 3a51f7a23f..373a9c7163 100644 --- a/test/functional/legacy/window_cmd_spec.lua +++ b/test/functional/legacy/window_cmd_spec.lua @@ -254,4 +254,29 @@ describe('splitkeep', function() | ]]) end) + + -- oldtest: Test_splitkeep_skipcol() + it('skipcol is not reset unnecessarily and is copied to new window', function() + screen:try_resize(40, 12) + exec([[ + set splitkeep=topline smoothscroll splitbelow scrolloff=0 + call setline(1, 'with lots of text in one line '->repeat(6)) + norm 2 + wincmd s + ]]) + screen:expect([[ + <<<e line with lots of text in one line | + with lots of text in one line with lots | + of text in one line | + ~ | + [No Name] [+] | + <<<e line with lots of text in one line | + ^with lots of text in one line with lots | + of text in one line | + ~ | + ~ | + [No Name] [+] | + | + ]]) + end) end) |