From 3b2d5317a55fe8dd4e2b786915b09bd46b5f2da7 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 24 Feb 2019 21:44:31 +0100 Subject: vim-patch:8.1.0225: mode() does not indicate using CTRL-O from Insert mode (#9644) Problem: Mode() does not indicate using CTRL-O from Insert mode. Solution: Add "niI", "niR" and "niV" to mode() result. (closes vim/vim#3000) https://github.com/vim/vim/commit/612cc3888b136e80485132d9f997ed457dbc5501 --- src/nvim/testdir/test_functions.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir/test_functions.vim') diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 7dc9f31ce7..bfe13d6b2d 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -556,6 +556,18 @@ func Test_mode() call assert_equal('n', mode(0)) call assert_equal('n', mode(1)) + " i_CTRL-O + exe "normal i\:call Save_mode()\\" + call assert_equal("n-niI", g:current_modes) + + " R_CTRL-O + exe "normal R\:call Save_mode()\\" + call assert_equal("n-niR", g:current_modes) + + " gR_CTRL-O + exe "normal gR\:call Save_mode()\\" + call assert_equal("n-niV", g:current_modes) + " How to test operator-pending mode? call feedkeys("v", 'xt') -- cgit