aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_functions.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-02-24 21:44:31 +0100
committerGitHub <noreply@github.com>2019-02-24 21:44:31 +0100
commit3b2d5317a55fe8dd4e2b786915b09bd46b5f2da7 (patch)
treeb6d6c534f946be6bc65b25e182a9680a2eaea917 /src/nvim/testdir/test_functions.vim
parent9327ea3e5a9b004fc494fd5a3864ad43086cddc9 (diff)
downloadrneovim-3b2d5317a55fe8dd4e2b786915b09bd46b5f2da7.tar.gz
rneovim-3b2d5317a55fe8dd4e2b786915b09bd46b5f2da7.tar.bz2
rneovim-3b2d5317a55fe8dd4e2b786915b09bd46b5f2da7.zip
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
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
-rw-r--r--src/nvim/testdir/test_functions.vim12
1 files changed, 12 insertions, 0 deletions
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\<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')