#ifdef CURSOR_SHAPE
ui_cursor_shape(); // may show different cursor shape
#endif
+ may_trigger_modechanged();
+ status_redraw_curbuf();
+ redraw_statuslines();
goto cmdline_not_changed;
case Ctrl_HAT:
return (char_u *)line_ga.ga_data;
}
-# if defined(MCH_CURSOR_SHAPE) || defined(FEAT_GUI) \
- || defined(FEAT_MOUSESHAPE) || defined(PROTO)
/*
* Return TRUE if ccline.overstrike is on.
*/
return ccline.overstrike;
}
+# if defined(MCH_CURSOR_SHAPE) || defined(FEAT_GUI) \
+ || defined(FEAT_MOUSESHAPE) || defined(PROTO)
/*
* Return TRUE if the cursor is at the end of the cmdline.
*/
call feedkeys(":echo \<C-R>=Save_mode()\<C-U>\<CR>", 'xt')
call assert_equal('c-c', g:current_modes)
+ call feedkeys(":\<insert>\<C-r>=Save_mode()\<CR>",'xt')
+ call assert_equal("c-cr", g:current_modes)
call feedkeys("gQecho \<C-R>=Save_mode()\<CR>\<CR>vi\<CR>", 'xt')
call assert_equal('c-cv', g:current_modes)
+ call feedkeys("gQ\<insert>\<C-r>=Save_mode()\<CR>",'xt')
+ call assert_equal("c-cvr", g:current_modes)
call feedkeys("Qcall Save_mode()\<CR>vi\<CR>", 'xt')
call assert_equal('c-ce', g:current_modes)
" How to test Ex mode?
call assert_equal('n-niR', g:current_modes)
execute "normal! gR\<C-o>g@l\<Esc>"
call assert_equal('n-niV', g:current_modes)
+ " Test statusline updates for overstike mode
+ if CanRunVimInTerminal()
+ let buf = RunVimInTerminal('', {'rows': 12})
+ call term_sendkeys(buf, ":set laststatus=2 statusline=%!mode(1)\<CR>")
+ call term_sendkeys(buf, ":")
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_mode_1', {})
+ call term_sendkeys(buf, "\<insert>")
+ call TermWait(buf)
+ call VerifyScreenDump(buf, 'Test_mode_2', {})
+ call StopVimInTerminal(buf)
+ endif
if has('terminal')
term