diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/edit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 8635735df3..dfb0386d0a 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -8680,11 +8680,12 @@ static char_u *do_insert_char_pre(int c) char_u *res = NULL; if (ins_apply_autocmds(EVENT_INSERTCHARPRE)) { - /* Get the value of v:char. It may be empty or more than one - * character. Only use it when changed, otherwise continue with the - * original character to avoid breaking autoindent. */ - if (STRCMP(buf, get_vim_var_str(VV_CHAR)) != 0) + // Get the value of v:char. It may be empty or more than one + // character. Only use it when changed, otherwise continue with the + // original character to avoid breaking autoindent. + if (STRCMP(buf, get_vim_var_str(VV_CHAR)) != 0) { res = vim_strsave(get_vim_var_str(VV_CHAR)); + } } set_vim_var_string(VV_CHAR, NULL, -1); |