diff src/testdir/test_search.vim @ 18693:d7c47e45bcc3 v8.1.2338

patch 8.1.2338: using Visual mark sith :s gives E20 if not set Commit: https://github.com/vim/vim/commit/c672525b487992306f69ceab093291ba3b8e4246 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 23 21:56:46 2019 +0100 patch 8.1.2338: using Visual mark sith :s gives E20 if not set Problem: Using Visual mark sith :s gives E20 if not set. Solution: Ignore errors when handling 'incsearch'. (closes https://github.com/vim/vim/issues/3837)
author Bram Moolenaar <Bram@vim.org>
date Sat, 23 Nov 2019 22:00:04 +0100
parents 0dcc2ee838dd
children ed246d4c46ba
line wrap: on
line diff
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -983,6 +983,19 @@ func Test_incsearch_substitute_dump()
   call VerifyScreenDump(buf, 'Test_incsearch_substitute_12', {})
   call term_sendkeys(buf, "\<Esc>")
   call VerifyScreenDump(buf, 'Test_incsearch_substitute_13', {})
+  call term_sendkeys(buf, ":%bwipe!\<CR>")
+  call term_sendkeys(buf, ":only!\<CR>")
+
+  "  get :'<,'>s command in history
+  call term_sendkeys(buf, ":set cmdheight=2\<CR>")
+  call term_sendkeys(buf, "aasdfasdf\<Esc>")
+  call term_sendkeys(buf, "V:s/a/b/g\<CR>")
+  " Using '<,'> does not give E20
+  call term_sendkeys(buf, ":new\<CR>")
+  call term_sendkeys(buf, "aasdfasdf\<Esc>")
+  call term_sendkeys(buf, ":\<Up>\<Up>")
+  call VerifyScreenDump(buf, 'Test_incsearch_substitute_14', {})
+  call term_sendkeys(buf, "<Esc>")
 
   call StopVimInTerminal(buf)
   call delete('Xis_subst_script')