Skip to content

Commit

Permalink
patch 8.0.1202: :wall gives an errof for a terminal window
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
brammool committed Oct 15, 2017
1 parent 44cc4cf commit 059db5c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ex_cmds.c
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions src/testdir/test_terminal.vim
Expand Up @@ -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
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -761,6 +761,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1202,
/**/
1201,
/**/
Expand Down

0 comments on commit 059db5c

Please sign in to comment.