patch 8.2.2885: searching for \%'> does not match linewise end of line
Problem: searching for \%'> does not match linewise end of line. (Tim Chase)
Solution: Match end of line if column is MAXCOL. (closes #8238)
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index e7c9ac4..b265e97 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -1332,13 +1332,28 @@
bwipe!
endfunc
+func Test_search_visual_area_linewise()
+ new
+ call setline(1, ['aa', 'bb', 'cc'])
+ exe "normal 2GV\<Esc>"
+ for engine in [1, 2]
+ exe 'set regexpengine=' .. engine
+ exe "normal gg/\\%'<\<CR>>"
+ call assert_equal([0, 2, 1, 0, 1], getcurpos(), 'engine ' .. engine)
+ exe "normal gg/\\%'>\<CR>"
+ call assert_equal([0, 2, 2, 0, 2], getcurpos(), 'engine ' .. engine)
+ endfor
+
+ bwipe!
+ set regexpengine&
+endfunc
+
func Test_search_sentence()
new
" this used to cause a crash
- call assert_fails("/\\%')", 'E486:')
- call assert_fails("/", 'E486:')
/\%'(
/
+ bwipe
endfunc
" Test that there is no crash when there is a last search pattern but no last