mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.5109: mode not updated after CTRL-O CTRL-C in Insert mode
Problem: Mode not updated after CTRL-O CTRL-C in Insert mode.
Solution: Set redraw_mode and use it. (closes vim/vim#10581)
7a1d32809b
This commit is contained in:
parent
93ba821831
commit
55da52963b
@ -1284,7 +1284,7 @@ static void normal_redraw(NormalState *s)
|
||||
update_screen(INVERTED);
|
||||
} else if (must_redraw) {
|
||||
update_screen(0);
|
||||
} else if (redraw_cmdline || clear_cmdline) {
|
||||
} else if (redraw_cmdline || clear_cmdline || redraw_mode) {
|
||||
showmode();
|
||||
}
|
||||
|
||||
@ -6930,6 +6930,10 @@ static void nv_esc(cmdarg_T *cap)
|
||||
}
|
||||
}
|
||||
|
||||
if (restart_edit != 0) {
|
||||
redraw_mode = true; // remove "-- (insert) --"
|
||||
}
|
||||
|
||||
restart_edit = 0;
|
||||
|
||||
if (cmdwin_type != 0) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
source shared.vim
|
||||
source check.vim
|
||||
source view_util.vim
|
||||
source screendump.vim
|
||||
|
||||
func Setup_NewWindow()
|
||||
10new
|
||||
@ -2889,6 +2890,20 @@ func Test_message_when_using_ctrl_c()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_mode_updated_after_ctrl_c()
|
||||
CheckScreendump
|
||||
|
||||
let buf = RunVimInTerminal('', {'rows': 5})
|
||||
call term_sendkeys(buf, "i")
|
||||
call term_sendkeys(buf, "\<C-O>")
|
||||
" wait a moment so that the "-- (insert) --" message is displayed
|
||||
call TermWait(buf, 50)
|
||||
call term_sendkeys(buf, "\<C-C>")
|
||||
call VerifyScreenDump(buf, 'Test_mode_updated_1', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
" Test for '[m', ']m', '[M' and ']M'
|
||||
" Jumping to beginning and end of methods in Java-like languages
|
||||
func Test_java_motion()
|
||||
|
@ -402,6 +402,28 @@ describe('messages', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
-- oldtest: Test_mode_updated_after_ctrl_c()
|
||||
it('pressing Ctrl-C in i_CTRL-O', function()
|
||||
feed('i<C-O>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{2:-- (insert) --} |
|
||||
]])
|
||||
feed('<C-C>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
-- oldtest: Test_ask_yesno()
|
||||
|
Loading…
Reference in New Issue
Block a user