diff src/testdir/test_textobjects.vim @ 20895:56c86b167b68 v8.2.0999

patch 8.2.0999: moving to next sentence gets stuck on quote Commit: https://github.com/vim/vim/commit/2f03e5a0a9cfaabb01c57dd3348a05e86c26623c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 18 15:33:25 2020 +0200 patch 8.2.0999: moving to next sentence gets stuck on quote Problem: Moving to next sentence gets stuck on quote. Solution: When moving to the next sentence doesn't result in moving, advance a character and try again. (closes #6291)
author Bram Moolenaar <Bram@vim.org>
date Thu, 18 Jun 2020 15:45:04 +0200
parents a4bd28e2cf1d
children cbc570e66d11
line wrap: on
line diff
--- a/src/testdir/test_textobjects.vim
+++ b/src/testdir/test_textobjects.vim
@@ -311,6 +311,17 @@ func Test_sentence_with_cursor_on_delimi
   normal! 17|yas
   call assert_equal("A '([sentence.])'  ", @")
 
+  " don't get stuck on a quote at the start of a sentence
+  %delete _
+  call setline(1, ['A sentence.', '"A sentence"?', 'A sentence!'])
+  normal gg))
+  call assert_equal(3, getcurpos()[1])
+
+  %delete _
+  call setline(1, ['A sentence.', "'A sentence'?", 'A sentence!'])
+  normal gg))
+  call assert_equal(3, getcurpos()[1])
+
   %delete _
 endfunc