diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-29 11:29:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-29 11:29:54 +0100 |
commit | 590f365f91511c164253c5b5812d4d0fc4a238d6 (patch) | |
tree | 4eecd9fe17cf271642522f7bdf71da51036f92de /src/misc1.c | |
parent | 758a8d199988b5b25566b2820db60dc2c9de3e58 (diff) |
patch 8.2.4845: duplicate codev8.2.4845
Problem: Duplicate code.
Solution: Move code below if/else. (closes #10314)
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/misc1.c b/src/misc1.c index 28d49639bc..2d41e358be 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -673,11 +673,6 @@ get_mode(char_u *buf) { 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 { @@ -685,12 +680,12 @@ get_mode(char_u *buf) 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) { |