]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.5044: command line test fails v8.2.5044
authorBram Moolenaar <Bram@vim.org>
Mon, 30 May 2022 15:01:42 +0000 (16:01 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 30 May 2022 15:01:42 +0000 (16:01 +0100)
Problem:    Command line test fails.
Solution:   Also beep when cmdline win can't be opened because of locks.
            Make the test not beep.  Make the test pass on MS-Windows.

src/ex_getln.c
src/testdir/test_substitute.vim
src/version.c

index 623bd1d4984a495fd3ef0d4aa4f05abc04c4f8ea..f75d8c7a963d0c53b99156437aee49f342b5ce1a 100644 (file)
@@ -4395,11 +4395,9 @@ open_cmdwin(void)
 #endif
 
     // Can't do this when text or buffer is locked.
-    if (text_or_buf_locked())
-       return K_IGNORE;
-
     // Can't do this recursively.  Can't do it when typing a password.
-    if (cmdwin_type != 0
+    if (text_or_buf_locked()
+           || cmdwin_type != 0
 # if defined(FEAT_CRYPT) || defined(FEAT_EVAL)
            || cmdline_star > 0
 # endif
index 3c87fafe74cf09db7eca3efaa9ec7e5aa619835f..5061c97261812c10ce14f5b8a176bd3d5ececa6f 100644 (file)
@@ -1040,6 +1040,7 @@ func Test_sub_open_cmdline_win()
   " the error only happens in a very specific setup, run a new Vim instance to
   " get a clean starting point.
   let lines =<< trim [SCRIPT]
+    set vb t_vb=
     norm o0000000000000000000000000000000000000000000000000000
     func Replace()
       norm q/
@@ -1052,8 +1053,8 @@ func Test_sub_open_cmdline_win()
   [SCRIPT]
   call writefile(lines, 'Xscript')
   if RunVim([], [], '-u NONE -S Xscript')
-    let messages = readfile('Xresult')
-    call assert_match('E565: Not allowed to change text or change window', messages[3])
+    call assert_match('E565: Not allowed to change text or change window',
+          \ readfile('Xresult')->join('XX'))
   endif
 
   call delete('Xscript')
index a15bb3ed8d6a6fcf436133d9117c5c24d578d83f..1e7b2a8442cd55adc3b0099471c40d4481a2656e 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5044,
 /**/
     5043,
 /**/