diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-04-27 04:54:50 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2023-05-02 13:11:46 +0200 |
commit | f3b44cf23d9c240471826e4f35555ee85ded1e5b (patch) | |
tree | 4ffc9f9a95ae1147f798f4b734a9d1d1d2771de3 /test/old | |
parent | e9b1df21bc9c051fe46578772c45c5bdadaf1e5c (diff) | |
download | rneovim-f3b44cf23d9c240471826e4f35555ee85ded1e5b.tar.gz rneovim-f3b44cf23d9c240471826e4f35555ee85ded1e5b.tar.bz2 rneovim-f3b44cf23d9c240471826e4f35555ee85ded1e5b.zip |
vim-patch:9.0.0652: 'smoothscroll' not tested with 'number' and "n" in 'cpo'
Problem: 'smoothscroll' not tested with 'number' and "n" in 'cpo'.
Solution: Add tests, fix uncovered problem.
https://github.com/vim/vim/commit/b6aab8f44beb8c5d99393abdc2c9faab085c72aa
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old')
-rw-r--r-- | test/old/testdir/test_scroll_opt.vim | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim index c1f6c66642..f574286b09 100644 --- a/test/old/testdir/test_scroll_opt.vim +++ b/test/old/testdir/test_scroll_opt.vim @@ -123,6 +123,41 @@ func Test_smoothscroll_CtrlE_CtrlY() call StopVimInTerminal(buf) endfunc +func Test_smoothscroll_number() + CheckScreendump + + let lines =<< trim END + vim9script + setline(1, [ + 'one ' .. 'word '->repeat(20), + 'two ' .. 'long word '->repeat(7), + 'line', + 'line', + 'line', + ]) + set smoothscroll + set number cpo+=n + :3 + END + call writefile(lines, 'XSmoothNumber', 'D') + let buf = RunVimInTerminal('-S XSmoothNumber', #{rows: 12, cols: 40}) + + call VerifyScreenDump(buf, 'Test_smooth_number_1', {}) + call term_sendkeys(buf, "\<C-E>") + call VerifyScreenDump(buf, 'Test_smooth_number_2', {}) + call term_sendkeys(buf, "\<C-E>") + call VerifyScreenDump(buf, 'Test_smooth_number_3', {}) + + call term_sendkeys(buf, ":set cpo-=n\<CR>") + call VerifyScreenDump(buf, 'Test_smooth_number_4', {}) + call term_sendkeys(buf, "\<C-Y>") + call VerifyScreenDump(buf, 'Test_smooth_number_5', {}) + call term_sendkeys(buf, "\<C-Y>") + call VerifyScreenDump(buf, 'Test_smooth_number_6', {}) + + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |