aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_gn.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-10-26 12:50:51 -0700
committerGitHub <noreply@github.com>2019-10-26 12:50:51 -0700
commitad532d3c660791337a9ea5100ab1e330480e382a (patch)
tree6142d4a147f26451a8679d441930f7691cecfdc3 /src/nvim/testdir/test_gn.vim
parent4b5e2f7a0b275230456f92892a89c781616284a8 (diff)
parent6dcc1d100572b462f75f64f7e98a0b5d80144cba (diff)
downloadrneovim-ad532d3c660791337a9ea5100ab1e330480e382a.tar.gz
rneovim-ad532d3c660791337a9ea5100ab1e330480e382a.tar.bz2
rneovim-ad532d3c660791337a9ea5100ab1e330480e382a.zip
Merge #11294 from tomtomjhj/vim-8.1.2173
vim-patch:8.1.{2173,2207,2218}
Diffstat (limited to 'src/nvim/testdir/test_gn.vim')
-rw-r--r--src/nvim/testdir/test_gn.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_gn.vim b/src/nvim/testdir/test_gn.vim
index 5e74289b00..834397126f 100644
--- a/src/nvim/testdir/test_gn.vim
+++ b/src/nvim/testdir/test_gn.vim
@@ -129,6 +129,32 @@ func Test_gn_command()
call assert_equal([' nnoremap', '', 'match'], getline(1,'$'))
sil! %d_
+ " make sure it works correctly for one-char wide search items
+ call setline('.', ['abcdefghi'])
+ let @/ = 'a'
+ exe "norm! 0fhvhhgNgU"
+ call assert_equal(['ABCDEFGHi'], getline(1,'$'))
+ call setline('.', ['abcdefghi'])
+ let @/ = 'b'
+ exe "norm! 0fhvhhgngU"
+ call assert_equal(['abcdefghi'], getline(1,'$'))
+ sil! %d _
+ call setline('.', ['abcdefghi'])
+ let @/ = 'f'
+ exe "norm! 0vllgngU"
+ call assert_equal(['ABCDEFghi'], getline(1,'$'))
+ sil! %d _
+ call setline('.', ['12345678'])
+ let @/ = '5'
+ norm! gg0f7vhhhhgnd
+ call assert_equal(['12348'], getline(1,'$'))
+ sil! %d _
+ call setline('.', ['12345678'])
+ let @/ = '5'
+ norm! gg0f2vf7gNd
+ call assert_equal(['1678'], getline(1,'$'))
+ sil! %d _
+
set wrapscan&vim
set belloff&vim
endfu