diff src/testdir/test_normal.vim @ 29179:432e1535ef2c v8.2.5109

patch 8.2.5109: mode not updated after CTRL-O CTRL-C in Insert mode Commit: https://github.com/vim/vim/commit/7a1d32809bb5c1527314000983e75125d79192e0 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 16 13:04:45 2022 +0100 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 https://github.com/vim/vim/issues/10581)
author Bram Moolenaar <Bram@vim.org>
date Thu, 16 Jun 2022 14:15:03 +0200
parents 5baf5e50049b
children b1f345ec827e
line wrap: on
line diff
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4,6 +4,7 @@ source shared.vim
 source check.vim
 source view_util.vim
 import './vim9.vim' as v9
+source screendump.vim
 
 func Setup_NewWindow()
   10new
@@ -2458,9 +2459,9 @@ func Test_normal33_g_cmd2()
   call assert_equal(2, line('.'))
   call assert_fails(':norm! g;', 'E662:')
   call assert_fails(':norm! g,', 'E663:')
-  let &ul=&ul
+  let &ul = &ul
   call append('$', ['a', 'b', 'c', 'd'])
-  let &ul=&ul
+  let &ul = &ul
   call append('$', ['Z', 'Y', 'X', 'W'])
   let a = execute(':changes')
   call assert_match('2\s\+0\s\+2', a)
@@ -3266,6 +3267,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()