mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
options: remove 'maxcombine` option (always use 6)
This commit is contained in:
parent
d8e18c96a9
commit
050f3975f6
@ -1059,8 +1059,7 @@ widespread as file format.
|
||||
A composing or combining character is used to change the meaning of the
|
||||
character before it. The combining characters are drawn on top of the
|
||||
preceding character.
|
||||
Up to two combining characters can be used by default. This can be changed
|
||||
with the 'maxcombine' option.
|
||||
Up to six combining characters can be displayed.
|
||||
When editing text a composing character is mostly considered part of the
|
||||
preceding character. For example "x" will delete a character and its
|
||||
following composing characters by default.
|
||||
|
@ -3888,16 +3888,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
set a time. This is to be compatible with Nvi.
|
||||
|
||||
*'maxcombine'* *'mco'*
|
||||
'maxcombine' 'mco' number (default 2)
|
||||
global
|
||||
{only available when compiled with the |+multi_byte|
|
||||
feature}
|
||||
The maximum number of combining characters supported for displaying.
|
||||
The default is OK for most languages. Hebrew may require 4.
|
||||
Maximum value is 6.
|
||||
Even when this option is set to 2 you can still edit text with more
|
||||
combining characters, you just can't see them. Use |g8| or |ga|.
|
||||
See |mbyte-combining|.
|
||||
'maxcombine' 'mco' Removed. |vim-differences| {Nvim}
|
||||
Nvim always displays up to 6 combining characters. You can still edit
|
||||
text with more than 6 combining characters, you just can't see them.
|
||||
Use |g8| or |ga|. See |mbyte-combining|.
|
||||
|
||||
*'maxfuncdepth'* *'mfd'*
|
||||
'maxfuncdepth' 'mfd' number (default 100)
|
||||
|
@ -409,6 +409,7 @@ Options:
|
||||
*'macatsui'*
|
||||
'maxmem' Nvim delegates memory-management to the OS.
|
||||
'maxmemtot' Nvim delegates memory-management to the OS.
|
||||
'maxcombine' (6 is always used)
|
||||
*'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
|
||||
'shelltype'
|
||||
*'shortname'* *'sn'* *'noshortname'* *'nosn'*
|
||||
|
@ -4102,11 +4102,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value,
|
||||
errmsg = e_winwidth;
|
||||
}
|
||||
} else if (pp == &p_mco) {
|
||||
if (value > MAX_MCO) {
|
||||
errmsg = e_invarg;
|
||||
} else if (value < 0) {
|
||||
errmsg = e_positive;
|
||||
}
|
||||
value = MAX_MCO;
|
||||
} else if (pp == &p_titlelen) {
|
||||
if (value < 0) {
|
||||
errmsg = e_positive;
|
||||
@ -4268,8 +4264,6 @@ static char *set_num_option(int opt_idx, char_u *varp, long value,
|
||||
if (pp == &curbuf->b_p_sw || curbuf->b_p_sw == 0) {
|
||||
parse_cino(curbuf);
|
||||
}
|
||||
} else if (pp == &p_mco) {
|
||||
screenclear(); // will re-allocate the screen
|
||||
} else if (pp == &curbuf->b_p_iminsert) {
|
||||
showmode();
|
||||
// Show/unshow value of 'keymap' in status lines.
|
||||
|
@ -1493,9 +1493,8 @@ return {
|
||||
full_name='maxcombine', abbreviation='mco',
|
||||
type='number', scope={'global'},
|
||||
vi_def=true,
|
||||
redraw={'curswant'},
|
||||
varname='p_mco',
|
||||
defaults={if_true={vi=2}}
|
||||
defaults={if_true={vi=6}}
|
||||
},
|
||||
{
|
||||
full_name='maxfuncdepth', abbreviation='mfd',
|
||||
|
@ -51,7 +51,6 @@ describe(':set validation', function()
|
||||
should_succeed('winminheight', 0)
|
||||
should_fail('winwidth', 0, 'E487')
|
||||
should_fail('helpheight', -1, 'E487')
|
||||
should_fail('maxcombine', 7, 'E474')
|
||||
should_fail('iminsert', 3, 'E474')
|
||||
should_fail('imsearch', 3, 'E474')
|
||||
should_fail('titlelen', -1, 'E487')
|
||||
@ -94,4 +93,18 @@ describe(':set validation', function()
|
||||
feed_command('set winminwidth=3')
|
||||
eq('E592', eval("v:errmsg"):match("E%d*"))
|
||||
end)
|
||||
|
||||
it('set maxcombine resets to 6', function()
|
||||
local function setto(value)
|
||||
feed_command('setglobal maxcombine=' .. value)
|
||||
feed_command('setlocal maxcombine=' .. value)
|
||||
meths.set_option('maxcombine', value)
|
||||
eq(6, meths.get_option('maxcombine'))
|
||||
eq('', eval("v:errmsg"))
|
||||
end
|
||||
setto(0)
|
||||
setto(1)
|
||||
setto(6)
|
||||
setto(7)
|
||||
end)
|
||||
end)
|
||||
|
@ -27,9 +27,8 @@ describe("folded lines", function()
|
||||
end)
|
||||
|
||||
it("works with multibyte text", function()
|
||||
-- Soon, we will always use the maximum value of 'maxcombine'.
|
||||
feed_command("set maxcombine=6")
|
||||
|
||||
-- Currently the only allowed value of 'maxcombine'
|
||||
eq(6, meths.get_option('maxcombine'))
|
||||
eq(true, meths.get_option('arabicshape'))
|
||||
insert([[
|
||||
å 语 x̨̣̘̫̲͚͎̎͂̀̂͛͛̾͢͟ العَرَبِيَّة
|
||||
|
Loading…
Reference in New Issue
Block a user