diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-03 07:21:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 07:21:09 +0800 |
commit | 62ecb05957f43b140e7dd874e1f84e3a6fa99838 (patch) | |
tree | 3bc2cb1f7ff44fe51f0973af513bd1c68cecd571 /test/functional/legacy | |
parent | 9909668111f521c7fc829ec8d8aa89beafff8777 (diff) | |
download | rneovim-62ecb05957f43b140e7dd874e1f84e3a6fa99838.tar.gz rneovim-62ecb05957f43b140e7dd874e1f84e3a6fa99838.tar.bz2 rneovim-62ecb05957f43b140e7dd874e1f84e3a6fa99838.zip |
vim-patch:9.0.1506: line number not displayed when using 'smoothscroll' (#23453)
Problem: Line number not displayed when using 'smoothscroll'.
Solution: Adjust condition for showing the line number. (closes vim/vim#12333)
https://github.com/vim/vim/commit/88bb3e0a48f160134bdea98cd2b8bd3af86f9d6f
Diffstat (limited to 'test/functional/legacy')
-rw-r--r-- | test/functional/legacy/display_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/legacy/scroll_opt_spec.lua | 48 |
2 files changed, 49 insertions, 1 deletions
diff --git a/test/functional/legacy/display_spec.lua b/test/functional/legacy/display_spec.lua index 4952a5c4fe..f1cd8d1aac 100644 --- a/test/functional/legacy/display_spec.lua +++ b/test/functional/legacy/display_spec.lua @@ -195,7 +195,7 @@ describe('display', function() run_test_display_lastline(true) end) - -- oldtest: Test_display_long_lastline + -- oldtest: Test_display_long_lastline() it('display "lastline" shows correct text when end of wrapped line is deleted', function() local screen = Screen.new(35, 14) screen:attach() diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index b00ff0bc7a..8af23d2c26 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -179,6 +179,7 @@ describe('smoothscroll', function() exec([[ call setline(1, [ 'one ' .. 'word '->repeat(20), 'two ' .. 'long word '->repeat(7), 'line', 'line', 'line', ]) set smoothscroll scrolloff=5 + set splitkeep=topline set number cpo+=n :3 func g:DoRel() @@ -277,6 +278,53 @@ describe('smoothscroll', function() ~ | | ]]) + exec('botright split') + feed('gg') + screen:expect([[ + 1 one word word word word word word wo| + rd word word word word word word wor| + d word word word word word word | + 2 two long word long word long word@@@| + [No Name] [+] | + 1 ^one word word word word word word wo| + rd word word word word word word wor| + d word word word word word word | + 2 two long word long word long word lo| + ng word long word long word long @@@| + [No Name] [+] | + | + ]]) + feed('<C-E>') + screen:expect([[ + 1 one word word word word word word wo| + rd word word word word word word wor| + d word word word word word word | + 2 two long word long word long word@@@| + [No Name] [+] | + <<< rd word word word word word word wor| + d word word word word word word^ | + 2 two long word long word long word lo| + ng word long word long word long wor| + d | + [No Name] [+] | + | + ]]) + feed('<C-E>') + screen:expect([[ + 1 one word word word word word word wo| + rd word word word word word word wor| + d word word word word word word | + 2 two long word long word long word@@@| + [No Name] [+] | + <<< d word word word word word word^ | + 2 two long word long word long word lo| + ng word long word long word long wor| + d | + 3 line | + [No Name] [+] | + | + ]]) + exec('close') exec('call DoRel()') screen:expect([[ 2<<<^ong text very long text very long te| |