From f484d3b2d4ec7f3a0c18c46125021aceedec03af Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 17 Nov 2019 21:48:59 -0500 Subject: vim-patch:8.1.2314: vi' sometimes does not select anything Problem: vi' sometimes does not select anything. Solution: Recognize an empty selection. (Christian Brabandt, closes vim/vim#5183) https://github.com/vim/vim/commit/7170b295b06e3168424985530d8477ed2e058b67 --- src/nvim/testdir/test_textobjects.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/testdir/test_textobjects.vim') diff --git a/src/nvim/testdir/test_textobjects.vim b/src/nvim/testdir/test_textobjects.vim index 9194e0014d..448b2dc51c 100644 --- a/src/nvim/testdir/test_textobjects.vim +++ b/src/nvim/testdir/test_textobjects.vim @@ -48,6 +48,9 @@ func Test_quote_selection_selection_exclusive() set selection=exclusive exe "norm! fdvhi'y" call assert_equal('bcde', @") + let @"='dummy' + exe "norm! $gevi'y" + call assert_equal('bcde', @") set selection&vim bw! endfunc -- cgit From cb107d28a00c3379dfb17df252c742c87369afcb Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 21 Nov 2019 20:29:13 -0500 Subject: vim-patch:8.1.2330: vi' does not always work when 'selection' is exclusive Problem: vi' does not always work when 'selection' is exclusive. Solution: Adjust start position. https://github.com/vim/vim/commit/94d9f4fa65bce6f116cf89bfdabdf5a06509056f --- src/nvim/testdir/test_textobjects.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir/test_textobjects.vim') diff --git a/src/nvim/testdir/test_textobjects.vim b/src/nvim/testdir/test_textobjects.vim index 448b2dc51c..b20c4df311 100644 --- a/src/nvim/testdir/test_textobjects.vim +++ b/src/nvim/testdir/test_textobjects.vim @@ -46,11 +46,18 @@ func Test_quote_selection_selection_exclusive() new call setline(1, "a 'bcde' f") set selection=exclusive + exe "norm! fdvhi'y" call assert_equal('bcde', @") + let @"='dummy' exe "norm! $gevi'y" call assert_equal('bcde', @") + + let @"='dummy' + exe "norm! 0fbhvi'y" + call assert_equal('bcde', @") + set selection&vim bw! endfunc -- cgit