mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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 #3000)
This commit is contained in:
@@ -464,6 +464,18 @@ func Test_mode()
|
||||
call assert_equal('n', mode(0))
|
||||
call assert_equal('n', mode(1))
|
||||
|
||||
" i_CTRL-O
|
||||
exe "normal i\<C-O>:call Save_mode()\<Cr>\<Esc>"
|
||||
call assert_equal("n-niI", g:current_modes)
|
||||
|
||||
" R_CTRL-O
|
||||
exe "normal R\<C-O>:call Save_mode()\<Cr>\<Esc>"
|
||||
call assert_equal("n-niR", g:current_modes)
|
||||
|
||||
" gR_CTRL-O
|
||||
exe "normal gR\<C-O>:call Save_mode()\<Cr>\<Esc>"
|
||||
call assert_equal("n-niV", g:current_modes)
|
||||
|
||||
" How to test operator-pending mode?
|
||||
|
||||
call feedkeys("v", 'xt')
|
||||
|
Reference in New Issue
Block a user