summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-09-16 22:32:15 +0200
committerBram Moolenaar <Bram@vim.org>2021-09-16 22:32:15 +0200
commit644b49fa0fb90143e8dbe90a7c14c9498d17b266 (patch)
treea2941b8f9bf49ba21dcf7b44e7a6b20aa9238c35 /src/edit.c
parent3dfe2e0fb8768914a019fa04b1ed9581e33c9b26 (diff)
patch 8.2.3444: concealed text not revealed when leaving insert modev8.2.3444
Problem: concealed text not revealed when leaving insert mode. (Michael Soyka) Solution: Check if concealing changed when leaving insert mode. (closes #8880)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index e1e796f0bb..070d84c609 100644
--- 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.