Skip to content

Commit 3339d3d

Browse files
committed
patch 8.1.0030: stoping Vim running in a terminal may not work
Problem: Stoping Vim running in a terminal may not work. Solution: Instead of sending <Esc> send CTRL-O.
1 parent 1580f75 commit 3339d3d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/testdir/screendump.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ endfunc
8181
" Stop a Vim running in terminal buffer "buf".
8282
func StopVimInTerminal(buf)
8383
call assert_equal("running", term_getstatus(a:buf))
84-
call term_sendkeys(a:buf, "\<Esc>:qa!\<cr>")
84+
85+
" CTRL-O : works both in Normal mode and Insert mode to start a command line.
86+
" In Command-line it's inserted, the CTRL-U removes it again.
87+
call term_sendkeys(a:buf, "\<C-O>\<C-U>:qa!\<cr>")
88+
8589
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
8690
only!
8791
endfunc

src/testdir/test_prompt_buffer.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ func Test_prompt_basic()
3434
\ 'func TimerFunc(text)',
3535
\ ' " Add the output above the current prompt.',
3636
\ ' call append(line("$") - 1, "Result: \"" . a:text . "\"")',
37+
\ ' " Reset &modified to allow the buffer to be closed.',
38+
\ ' set nomodified',
3739
\ 'endfunc',
3840
\ '',
3941
\ 'call setline(1, "other buffer")',
42+
\ 'set nomodified',
4043
\ 'new',
4144
\ 'set buftype=prompt',
4245
\ 'call prompt_setcallback(bufnr(""), function("TextEntered"))',

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+
30,
764766
/**/
765767
29,
766768
/**/

0 commit comments

Comments
 (0)