File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3688,6 +3688,7 @@ ins_esc(
36883688 else
36893689 {
36903690 -- curwin -> w_cursor .col ;
3691+ curwin -> w_valid &= ~(VALID_WCOL |VALID_VIRTCOL );
36913692 // Correct cursor for multi-byte character.
36923693 if (has_mbyte )
36933694 mb_adjust_cursor ();
Original file line number Diff line number Diff line change 305305 params .want_full_screen = FALSE;
306306
307307 /*
308- * When certain to start the GUI, don't check capabilities of terminal.
308+ * When certain to start the GUI, don't check terminal capabilities .
309309 * For GTK we can't be sure, but when started from the desktop it doesn't
310310 * make sense to try using a terminal.
311311 */
@@ -1290,7 +1290,11 @@ main_loop(
12901290 * update cursor and redraw.
12911291 */
12921292 if (skip_redraw || exmode_active )
1293+ {
12931294 skip_redraw = FALSE;
1295+ setcursor ();
1296+ cursor_on ();
1297+ }
12941298 else if (do_redraw || stuff_empty ())
12951299 {
12961300#ifdef FEAT_GUI
Original file line number Diff line number Diff line change 1+ >:+0&#ffffff0| @58
2+ |~+0#4040ff13&| @58
3+ |~| @58
4+ |~| @58
5+ |~| @58
6+ | +0#0000000&@59
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ if exists("+t_kD")
55endif
66
77source check.vim
8+ source screendump.vim
89
910" Needed for testing basic rightleft: Test_edit_rightleft
1011source view_util.vim
@@ -1957,6 +1958,22 @@ func Test_edit_insert_reg()
19571958 close !
19581959endfunc
19591960
1961+ " Test for positioning cursor after CTRL-R expression failed
1962+ func Test_edit_ctrl_r_failed ()
1963+ CheckRunVimInTerminal
1964+
1965+ let buf = RunVimInTerminal (' ' , #{rows: 6 , cols: 60 })
1966+
1967+ " trying to insert a dictionary produces an error
1968+ call term_sendkeys (buf , " i\<C-R> ={}\<CR> " )
1969+
1970+ " ending Insert mode should put the cursor back on the ':'
1971+ call term_sendkeys (buf , " :\<Esc> " )
1972+ call VerifyScreenDump (buf , ' Test_edit_ctlr_r_failed_1' , {})
1973+
1974+ call StopVimInTerminal (buf )
1975+ endfunc
1976+
19601977" When a character is inserted at the last position of the last line in a
19611978" window, the window contents should be scrolled one line up. If the top line
19621979" is part of a fold, then the entire fold should be scrolled up.
Original file line number Diff line number Diff line change @@ -695,6 +695,8 @@ static char *(features[]) =
695695
696696static int included_patches [] =
697697{ /* Add new patch number below this line */
698+ /**/
699+ 1428 ,
698700/**/
699701 1427 ,
700702/**/
You can’t perform that action at this time.
0 commit comments