Mercurial > vim
diff src/edit.c @ 25818:37bc83bbda91 v8.2.3444
patch 8.2.3444: concealed text not revealed when leaving insert mode
Commit: https://github.com/vim/vim/commit/644b49fa0fb90143e8dbe90a7c14c9498d17b266
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 16 22:32:15 2021 +0200
patch 8.2.3444: concealed text not revealed when leaving insert mode
Problem: concealed text not revealed when leaving insert mode. (Michael
Soyka)
Solution: Check if concealing changed when leaving insert mode.
(closes #8880)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 16 Sep 2021 22:45:03 +0200 |
parents | 16a7d1154be8 |
children | 45a8b2b2f652 |
line wrap: on
line diff
--- a/src/edit.c +++ b/src/edit.c @@ -3582,6 +3582,11 @@ ins_esc( { int temp; static int disabled_redraw = FALSE; +#ifdef FEAT_CONCEAL + // Remember if the cursor line was concealed before changing State. + int cursor_line_was_concealed = curwin->w_p_cole > 0 + && conceal_cursor_line(curwin); +#endif #ifdef FEAT_SPELL check_spell_redraw(); @@ -3701,6 +3706,11 @@ ins_esc( // Re-enable modifyOtherKeys. out_str(T_CTI); } +#ifdef FEAT_CONCEAL + // Check if the cursor line needs redrawing after changing State. If + // 'concealcursor' is "i" it needs to be redrawn without concealing. + conceal_check_cursor_line(cursor_line_was_concealed); +#endif // When recording or for CTRL-O, need to display the new mode. // Otherwise remove the mode message.