Mercurial > vim
diff src/testdir/test_normal.vim @ 16089:4411c38f3d16 v8.1.1049
patch 8.1.1049: when user tries to exit with CTRL-C message is confusing
commit https://github.com/vim/vim/commit/a84a3dd6635fcd2e07f510cba6a999585dcc381a
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 25 22:21:24 2019 +0100
patch 8.1.1049: when user tries to exit with CTRL-C message is confusing
Problem: When user tries to exit with CTRL-C message is confusing.
Solution: Only mention ":qa!" when there is a changed buffer. (closes https://github.com/vim/vim/issues/4163)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 25 Mar 2019 22:30:05 +0100 |
parents | 2dcaa860e3fc |
children | 4673f22da44d |
line wrap: on
line diff
--- 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