Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
16088:5dd54a14decf | 16089:4411c38f3d16 |
---|---|
1 " Test for various Normal mode commands | 1 " Test for various Normal mode commands |
2 | |
3 source shared.vim | |
2 | 4 |
3 func Setup_NewWindow() | 5 func Setup_NewWindow() |
4 10new | 6 10new |
5 call setline(1, range(1,100)) | 7 call setline(1, range(1,100)) |
6 endfunc | 8 endfunc |
2540 call feedkeys(l:bar_nr . "\<C-^>", 'tx') | 2542 call feedkeys(l:bar_nr . "\<C-^>", 'tx') |
2541 call assert_equal('Xbar', fnamemodify(bufname('%'), ':t')) | 2543 call assert_equal('Xbar', fnamemodify(bufname('%'), ':t')) |
2542 | 2544 |
2543 %bwipeout! | 2545 %bwipeout! |
2544 endfunc | 2546 endfunc |
2547 | |
2548 func Test_message_when_using_ctrl_c() | |
2549 exe "normal \<C-C>" | |
2550 call assert_match("Type :qa and press <Enter> to exit Vim", Screenline(&lines)) | |
2551 new | |
2552 cal setline(1, 'hi!') | |
2553 exe "normal \<C-C>" | |
2554 call assert_match("Type :qa! and press <Enter> to abandon all changes and exit Vim", Screenline(&lines)) | |
2555 bwipe! | |
2556 endfunc |