summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_normal.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-25 22:21:24 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-25 22:21:24 +0100
commita84a3dd6635fcd2e07f510cba6a999585dcc381a (patch)
tree5ec1f6fef107b2cf8fe33a5bf5bb04fd9edc6999 /src/testdir/test_normal.vim
parentb45125b374cc3a1cef176b704f518c72c518f24c (diff)
patch 8.1.1049: when user tries to exit with CTRL-C message is confusingv8.1.1049
Problem: When user tries to exit with CTRL-C message is confusing. Solution: Only mention ":qa!" when there is a changed buffer. (closes #4163)
Diffstat (limited to 'src/testdir/test_normal.vim')
-rw-r--r--src/testdir/test_normal.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 1224a3f7da..4c63bb8ab0 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -1,5 +1,7 @@
" Test for various Normal mode commands
+source shared.vim
+
func Setup_NewWindow()
10new
call setline(1, range(1,100))
@@ -2542,3 +2544,13 @@ func Test_nv_hat_count()
%bwipeout!
endfunc
+
+func Test_message_when_using_ctrl_c()
+ exe "normal \<C-C>"
+ call assert_match("Type :qa and press <Enter> to exit Vim", Screenline(&lines))
+ new
+ cal setline(1, 'hi!')
+ exe "normal \<C-C>"
+ call assert_match("Type :qa! and press <Enter> to abandon all changes and exit Vim", Screenline(&lines))
+ bwipe!
+endfunc