]> granicus.if.org Git - vim/commitdiff
patch 8.0.1202: :wall gives an errof for a terminal window v8.0.1202
authorBram Moolenaar <Bram@vim.org>
Sun, 15 Oct 2017 20:42:23 +0000 (22:42 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 15 Oct 2017 20:42:23 +0000 (22:42 +0200)
Problem:    :wall gives an errof for a terminal window. (Marius Gedminas)
Solution:   Don't try writing a buffer that can't be written. (Yasuhiro
            Matsumoto, closes #2190)

src/ex_cmds.c
src/testdir/test_terminal.vim
src/version.c

index b4351b23dc35ca855979d5b96f526fccd592fb89..60f47bbd245e8690ecf1adea9ad4d9639df9b12a 100644 (file)
@@ -3400,7 +3400,7 @@ do_wqall(exarg_T *eap)
 
     FOR_ALL_BUFFERS(buf)
     {
-       if (bufIsChanged(buf))
+       if (bufIsChanged(buf) && !bt_dontwrite(buf))
        {
            /*
             * Check if there is a reason the buffer cannot be written:
index cff85a459382db7be9555c5b51df1791fc904988..92dcd1a5771515f323dc30493cd56673529fb289 100644 (file)
@@ -676,3 +676,12 @@ func Test_terminal_tmap()
   call TerminalTmap(1)
   call TerminalTmap(0)
 endfunc
+
+func Test_terminal_wall()
+  let buf = Run_shell_in_terminal({})
+  wall
+  call Stop_shell_in_terminal(buf)
+  call term_wait(buf)
+  exe buf . 'bwipe'
+  unlet g:job
+endfunc
index edc29cc4fb4e896bdd30e6e8c01bdb7b06776122..0f4d23ba99370cf13050775e7a21236cba587068 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1202,
 /**/
     1201,
 /**/