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)
4cf56bbc85
This commit is contained in:
Jan Edmund Lazo
2019-02-03 09:04:47 -05:00
parent 45fadf7323
commit 5a40abe2d5
3 changed files with 6 additions and 10 deletions

View File

@@ -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. may change in later releases.
*'iminsert'* *'imi'* *'iminsert'* *'imi'*
'iminsert' 'imi' number (default 0, 2 when an input method is supported) 'iminsert' 'imi' number (default 0)
local to buffer local to buffer
Specifies whether :lmap or an Input Method (IM) is to be used in Specifies whether :lmap or an Input Method (IM) is to be used in
Insert mode. Valid values: 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". It is also used for the argument of commands like "r" and "f".
*'imsearch'* *'ims'* *'imsearch'* *'ims'*
'imsearch' 'ims' number (default 0, 2 when an input method is supported) 'imsearch' 'ims' number (default -1)
local to buffer local to buffer
Specifies whether :lmap or an Input Method (IM) is to be used when Specifies whether :lmap or an Input Method (IM) is to be used when
entering a search pattern. Valid values: entering a search pattern. Valid values:

View File

@@ -1173,9 +1173,7 @@ return {
vi_def=true, vi_def=true,
varname='p_iminsert', pv_name='p_imi', varname='p_iminsert', pv_name='p_imi',
defaults={ defaults={
condition='B_IMODE_IM', if_true={vi=macros('B_IMODE_NONE')},
if_true={vi=macros('B_IMODE_IM')},
if_false={vi=macros('B_IMODE_NONE')},
} }
}, },
{ {
@@ -1184,9 +1182,7 @@ return {
vi_def=true, vi_def=true,
varname='p_imsearch', pv_name='p_ims', varname='p_imsearch', pv_name='p_ims',
defaults={ defaults={
condition='B_IMODE_IM', if_true={vi=macros('B_IMODE_USE_INSERT')},
if_true={vi=macros('B_IMODE_IM')},
if_false={vi=macros('B_IMODE_NONE')},
} }
}, },
{ {

View File

@@ -32,9 +32,9 @@ describe(':setlocal', function()
eq(0, meths.get_option('iminsert')) eq(0, meths.get_option('iminsert'))
feed_command('setlocal iminsert=1') feed_command('setlocal iminsert=1')
eq(0, meths.get_option('iminsert')) eq(0, meths.get_option('iminsert'))
eq(0, meths.get_option('imsearch')) eq(-1, meths.get_option('imsearch'))
feed_command('setlocal imsearch=1') feed_command('setlocal imsearch=1')
eq(0, meths.get_option('imsearch')) eq(-1, meths.get_option('imsearch'))
end) end)
end) end)