diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-12-23 07:16:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-23 07:16:21 +0100 |
| commit | 2ef72437fc2e20ed7eee2520d818d3039b8e52bb (patch) | |
| tree | 74ce9d579586d56f8a4fe538cae4f235595c840d /src/nvim/testdir | |
| parent | 2e280dac7df504b0681043647c8cc02abcbcc686 (diff) | |
| parent | a16de288c3d3e033ab0cd60fec2a2d2042774685 (diff) | |
| download | rneovim-2ef72437fc2e20ed7eee2520d818d3039b8e52bb.tar.gz rneovim-2ef72437fc2e20ed7eee2520d818d3039b8e52bb.tar.bz2 rneovim-2ef72437fc2e20ed7eee2520d818d3039b8e52bb.zip | |
Merge #11594 from janlazo/vim-8.0.1767
vim-patch:8.0.1767,8.2.0030
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_gf.vim | 8 | ||||
| -rw-r--r-- | src/nvim/testdir/test_search.vim | 31 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_gf.vim b/src/nvim/testdir/test_gf.vim index d301874891..4a4ffcefa1 100644 --- a/src/nvim/testdir/test_gf.vim +++ b/src/nvim/testdir/test_gf.vim @@ -58,6 +58,14 @@ func Test_gF() call assert_equal('Xfile', bufname('%')) call assert_equal(3, getcurpos()[1]) + enew! + call setline(1, ['one', 'the Xfile line 2, and more', 'three']) + w! Xfile2 + normal 2GfX + normal gF + call assert_equal('Xfile', bufname('%')) + call assert_equal(2, getcurpos()[1]) + set isfname& call delete('Xfile') call delete('Xfile2') diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 68eb311e3c..5d99027ca5 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -1,6 +1,7 @@ " Test for the search command source shared.vim +source screendump.vim func Test_search_cmdline() " See test/functional/legacy/search_spec.lua @@ -549,6 +550,36 @@ func Test_incsearch_with_change() call delete('Xis_change_script') endfunc +func Test_incsearch_scrolling() + if !CanRunVimInTerminal() + return + endif + call assert_equal(0, &scrolloff) + call writefile([ + \ 'let dots = repeat(".", 120)', + \ 'set incsearch cmdheight=2 scrolloff=0', + \ 'call setline(1, [dots, dots, dots, "", "target", dots, dots])', + \ 'normal gg', + \ 'redraw', + \ ], 'Xscript') + let buf = RunVimInTerminal('-S Xscript', {'rows': 9, 'cols': 70}) + " Need to send one key at a time to force a redraw + call term_sendkeys(buf, '/') + sleep 100m + call term_sendkeys(buf, 't') + sleep 100m + call term_sendkeys(buf, 'a') + sleep 100m + call term_sendkeys(buf, 'r') + sleep 100m + call term_sendkeys(buf, 'g') + call VerifyScreenDump(buf, 'Test_incsearch_scrolling_01', {}) + + call term_sendkeys(buf, "\<Esc>") + call StopVimInTerminal(buf) + call delete('Xscript') +endfunc + func Test_search_undefined_behaviour() if !has("terminal") return |