diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-02-03 09:04:47 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-02-03 09:52:13 -0500 |
commit | 5a40abe2d599b67af3afa319cf89932824438a6f (patch) | |
tree | 40c4d190b93958fe47b478ff09817a7b46c254a3 | |
parent | 45fadf732327c9bffc7cfec98f4ac80892c1a921 (diff) | |
download | rneovim-5a40abe2d599b67af3afa319cf89932824438a6f.tar.gz rneovim-5a40abe2d599b67af3afa319cf89932824438a6f.tar.bz2 rneovim-5a40abe2d599b67af3afa319cf89932824438a6f.zip |
vim-patch:8.0.1114: default for 'iminsert' is annoying
Problem: Default for 'iminsert' is annoying.
Solution: Make the default always zero. (Yasuhiro Matsumoto, closes vim/vim#2071)
https://github.com/vim/vim/commit/4cf56bbc85f77846aeb378cfb071677336dfad6d
-rw-r--r-- | runtime/doc/options.txt | 4 | ||||
-rw-r--r-- | src/nvim/options.lua | 8 | ||||
-rw-r--r-- | test/functional/options/num_options_spec.lua | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index bf75bebb80..b6ea63449d 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3134,7 +3134,7 @@ A jump table for the options with a short description can be found at |Q_op|. may change in later releases. *'iminsert'* *'imi'* -'iminsert' 'imi' number (default 0, 2 when an input method is supported) +'iminsert' 'imi' number (default 0) local to buffer Specifies whether :lmap or an Input Method (IM) is to be used in Insert mode. Valid values: @@ -3154,7 +3154,7 @@ A jump table for the options with a short description can be found at |Q_op|. It is also used for the argument of commands like "r" and "f". *'imsearch'* *'ims'* -'imsearch' 'ims' number (default 0, 2 when an input method is supported) +'imsearch' 'ims' number (default -1) local to buffer Specifies whether :lmap or an Input Method (IM) is to be used when entering a search pattern. Valid values: diff --git a/src/nvim/options.lua b/src/nvim/options.lua index c3aff87bbf..222ec5457b 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -1173,9 +1173,7 @@ return { vi_def=true, varname='p_iminsert', pv_name='p_imi', defaults={ - condition='B_IMODE_IM', - if_true={vi=macros('B_IMODE_IM')}, - if_false={vi=macros('B_IMODE_NONE')}, + if_true={vi=macros('B_IMODE_NONE')}, } }, { @@ -1184,9 +1182,7 @@ return { vi_def=true, varname='p_imsearch', pv_name='p_ims', defaults={ - condition='B_IMODE_IM', - if_true={vi=macros('B_IMODE_IM')}, - if_false={vi=macros('B_IMODE_NONE')}, + if_true={vi=macros('B_IMODE_USE_INSERT')}, } }, { diff --git a/test/functional/options/num_options_spec.lua b/test/functional/options/num_options_spec.lua index fb0559054d..88e554c86f 100644 --- a/test/functional/options/num_options_spec.lua +++ b/test/functional/options/num_options_spec.lua @@ -32,9 +32,9 @@ describe(':setlocal', function() eq(0, meths.get_option('iminsert')) feed_command('setlocal iminsert=1') eq(0, meths.get_option('iminsert')) - eq(0, meths.get_option('imsearch')) + eq(-1, meths.get_option('imsearch')) feed_command('setlocal imsearch=1') - eq(0, meths.get_option('imsearch')) + eq(-1, meths.get_option('imsearch')) end) end) |