Skip to content

Commit 059db5c

Browse files
committed
patch 8.0.1202: :wall gives an errof for a terminal window
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)
1 parent 44cc4cf commit 059db5c

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/ex_cmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3400,7 +3400,7 @@ do_wqall(exarg_T *eap)
34003400

34013401
FOR_ALL_BUFFERS(buf)
34023402
{
3403-
if (bufIsChanged(buf))
3403+
if (bufIsChanged(buf) && !bt_dontwrite(buf))
34043404
{
34053405
/*
34063406
* Check if there is a reason the buffer cannot be written:

src/testdir/test_terminal.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,3 +676,12 @@ func Test_terminal_tmap()
676676
call TerminalTmap(1)
677677
call TerminalTmap(0)
678678
endfunc
679+
680+
func Test_terminal_wall()
681+
let buf = Run_shell_in_terminal({})
682+
wall
683+
call Stop_shell_in_terminal(buf)
684+
call term_wait(buf)
685+
exe buf . 'bwipe'
686+
unlet g:job
687+
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1202,
764766
/**/
765767
1201,
766768
/**/

0 commit comments

Comments
 (0)