Mercurial > vim
changeset 28643:5be5151ad510
patch 8.2.4845: duplicate code
Commit: https://github.com/vim/vim/commit/590f365f91511c164253c5b5812d4d0fc4a238d6
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri Apr 29 11:29:54 2022 +0100
patch 8.2.4845: duplicate code
Problem: Duplicate code.
Solution: Move code below if/else. (closes https://github.com/vim/vim/issues/10314)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 29 Apr 2022 12:30:03 +0200 |
parents | 96f0542ebb22 |
children | 0c63014c2513 |
files | src/misc1.c src/version.c |
diffstat | 2 files changed, 7 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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) {