mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
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.
This commit is contained in:
parent
1580f755c9
commit
3339d3dad9
@ -81,7 +81,11 @@ endfunc
|
|||||||
" Stop a Vim running in terminal buffer "buf".
|
" Stop a Vim running in terminal buffer "buf".
|
||||||
func StopVimInTerminal(buf)
|
func StopVimInTerminal(buf)
|
||||||
call assert_equal("running", term_getstatus(a:buf))
|
call assert_equal("running", term_getstatus(a:buf))
|
||||||
call term_sendkeys(a:buf, "\<Esc>:qa!\<cr>")
|
|
||||||
|
" CTRL-O : works both in Normal mode and Insert mode to start a command line.
|
||||||
|
" In Command-line it's inserted, the CTRL-U removes it again.
|
||||||
|
call term_sendkeys(a:buf, "\<C-O>\<C-U>:qa!\<cr>")
|
||||||
|
|
||||||
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
|
call WaitForAssert({-> assert_equal("finished", term_getstatus(a:buf))})
|
||||||
only!
|
only!
|
||||||
endfunc
|
endfunc
|
||||||
|
@ -34,9 +34,12 @@ func Test_prompt_basic()
|
|||||||
\ 'func TimerFunc(text)',
|
\ 'func TimerFunc(text)',
|
||||||
\ ' " Add the output above the current prompt.',
|
\ ' " Add the output above the current prompt.',
|
||||||
\ ' call append(line("$") - 1, "Result: \"" . a:text . "\"")',
|
\ ' call append(line("$") - 1, "Result: \"" . a:text . "\"")',
|
||||||
|
\ ' " Reset &modified to allow the buffer to be closed.',
|
||||||
|
\ ' set nomodified',
|
||||||
\ 'endfunc',
|
\ 'endfunc',
|
||||||
\ '',
|
\ '',
|
||||||
\ 'call setline(1, "other buffer")',
|
\ 'call setline(1, "other buffer")',
|
||||||
|
\ 'set nomodified',
|
||||||
\ 'new',
|
\ 'new',
|
||||||
\ 'set buftype=prompt',
|
\ 'set buftype=prompt',
|
||||||
\ 'call prompt_setcallback(bufnr(""), function("TextEntered"))',
|
\ 'call prompt_setcallback(bufnr(""), function("TextEntered"))',
|
||||||
|
@ -761,6 +761,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
30,
|
||||||
/**/
|
/**/
|
||||||
29,
|
29,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user