comparison src/testdir/test_functions.vim @ 14422:06316dbd66bc v8.1.0225

patch 8.1.0225: mode() does not indicate using CTRL-O from Insert mode commit https://github.com/vim/vim/commit/612cc3888b136e80485132d9f997ed457dbc5501 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 29 15:34:26 2018 +0200 patch 8.1.0225: mode() does not indicate using CTRL-O from Insert mode Problem: Mode() does not indicate using CTRL-O from Insert mode. Solution: Add "niI", "niR" and "niV" to mode() result. (closes https://github.com/vim/vim/issues/3000)
author Christian Brabandt <cb@256bit.org>
date Sun, 29 Jul 2018 15:45:05 +0200
parents 0f1446193ded
children 336213a840d9
comparison
equal deleted inserted replaced
14421:2f7e67dd088c 14422:06316dbd66bc
462 call assert_equal('R-Rc', g:current_modes) 462 call assert_equal('R-Rc', g:current_modes)
463 463
464 call assert_equal('n', mode(0)) 464 call assert_equal('n', mode(0))
465 call assert_equal('n', mode(1)) 465 call assert_equal('n', mode(1))
466 466
467 " i_CTRL-O
468 exe "normal i\<C-O>:call Save_mode()\<Cr>\<Esc>"
469 call assert_equal("n-niI", g:current_modes)
470
471 " R_CTRL-O
472 exe "normal R\<C-O>:call Save_mode()\<Cr>\<Esc>"
473 call assert_equal("n-niR", g:current_modes)
474
475 " gR_CTRL-O
476 exe "normal gR\<C-O>:call Save_mode()\<Cr>\<Esc>"
477 call assert_equal("n-niV", g:current_modes)
478
467 " How to test operator-pending mode? 479 " How to test operator-pending mode?
468 480
469 call feedkeys("v", 'xt') 481 call feedkeys("v", 'xt')
470 call assert_equal('v', mode()) 482 call assert_equal('v', mode())
471 call assert_equal('v', mode(1)) 483 call assert_equal('v', mode(1))