vim-patch:8.2.4845: duplicate code

Problem:    Duplicate code.
Solution:   Move code below if/else. (closes vim/vim#10314)
590f365f91

N/A patches for version.c:

vim-patch:8.2.4844: <C-S-I> is simplified to <S-Tab>

Problem:    <C-S-I> is simplified to <S-Tab>.
Solution:   Do not simplify CTRL if there is also SHIFT. (closes vim/vim#10313)
758a8d1999

vim-patch:8.2.4846: termcodes test fails

Problem:    Termcodes test fails.
Solution:   use CTRL-SHIFT-V to insert an unsimplified key. (closes vim/vim#10316)
bad8a013c2
This commit is contained in:
zeertzjq
2022-04-30 05:58:13 +08:00
parent 02e9a402ca
commit 1f72e31550

View File

@@ -187,22 +187,17 @@ void get_mode(char *buf)
if (State & VREPLACE_FLAG) {
buf[i++] = 'R';
buf[i++] = 'v';
if (ins_compl_active()) {
buf[i++] = 'c';
} else if (ctrl_x_mode_not_defined_yet()) {
buf[i++] = 'x';
}
} else {
if (State & REPLACE_FLAG) {
buf[i++] = 'R';
} else {
buf[i++] = 'i';
}
if (ins_compl_active()) {
buf[i++] = 'c';
} else if (ctrl_x_mode_not_defined_yet()) {
buf[i++] = 'x';
}
}
if (ins_compl_active()) {
buf[i++] = 'c';
} else if (ctrl_x_mode_not_defined_yet()) {
buf[i++] = 'x';
}
} else if ((State & CMDLINE) || exmode_active) {
buf[i++] = 'c';