summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-03 17:10:40 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-03 17:10:40 +0200
commit3339d3dad93a44eac76c71cfa48c86a20d3dddcc (patch)
tree6d9401bf75a02c997e2b836ed93cd04b1ee22afb
parent1580f755c91d12a3e63d60eec8733f8b79debc31 (diff)
patch 8.1.0030: stoping Vim running in a terminal may not workv8.1.0030
Problem: Stoping Vim running in a terminal may not work. Solution: Instead of sending <Esc> send CTRL-O.
-rw-r--r--src/testdir/screendump.vim6
-rw-r--r--src/testdir/test_prompt_buffer.vim3
-rw-r--r--src/version.c2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim
index 80d51c336d..58966458a4 100644
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -81,7 +81,11 @@ endfunc
" Stop a Vim running in terminal buffer "buf".
func StopVimInTerminal(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))})
only!
endfunc
diff --git a/src/testdir/test_prompt_buffer.vim b/src/testdir/test_prompt_buffer.vim
index 3a0469da63..f7363d9ad5 100644
--- a/src/testdir/test_prompt_buffer.vim
+++ b/src/testdir/test_prompt_buffer.vim
@@ -34,9 +34,12 @@ func Test_prompt_basic()
\ 'func TimerFunc(text)',
\ ' " Add the output above the current prompt.',
\ ' call append(line("$") - 1, "Result: \"" . a:text . "\"")',
+ \ ' " Reset &modified to allow the buffer to be closed.',
+ \ ' set nomodified',
\ 'endfunc',
\ '',
\ 'call setline(1, "other buffer")',
+ \ 'set nomodified',
\ 'new',
\ 'set buftype=prompt',
\ 'call prompt_setcallback(bufnr(""), function("TextEntered"))',
diff --git a/src/version.c b/src/version.c
index 70fd603354..d13bcfdb5c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 30,
+/**/
29,
/**/
28,