changeset 14025:eb5ee7479d31 v8.1.0030

patch 8.1.0030: stoping Vim running in a terminal may not work commit https://github.com/vim/vim/commit/3339d3dad93a44eac76c71cfa48c86a20d3dddcc Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 3 17:10:40 2018 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Jun 2018 17:15:05 +0200
parents 11e8dcf02bbe
children 60991b6bbd01
files src/testdir/screendump.vim src/testdir/test_prompt_buffer.vim src/version.c
diffstat 3 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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"))',
--- 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,