From 535d5b653a1eddf49ee11dc9639c5355ef023301 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 11 Jan 2019 20:45:36 +0100 Subject: patch 8.1.0726: redrawing specifically for conceal feature Problem: Redrawing specifically for conceal feature. Solution: Use generic redrawing methods. --- src/main.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 2f8f0523f..7c8014c83 100644 --- a/src/main.c +++ b/src/main.c @@ -1194,6 +1194,22 @@ main_loop( last_cursormoved = curwin->w_cursor; } +#if defined(FEAT_CONCEAL) + if (conceal_update_lines + && (conceal_old_cursor_line != conceal_new_cursor_line + || conceal_cursor_line(curwin) + || need_cursor_line_redraw)) + { + if (conceal_old_cursor_line != conceal_new_cursor_line + && conceal_old_cursor_line + <= curbuf->b_ml.ml_line_count) + redrawWinline(curwin, conceal_old_cursor_line); + redrawWinline(curwin, conceal_new_cursor_line); + curwin->w_valid &= ~VALID_CROW; + need_cursor_line_redraw = FALSE; + } +#endif + /* Trigger TextChanged if b:changedtick differs. */ if (!finish_op && has_textchanged() && curbuf->b_last_changedtick != CHANGEDTICK(curbuf)) @@ -1288,22 +1304,6 @@ main_loop( may_clear_sb_text(); /* clear scroll-back text on next msg */ showruler(FALSE); -#if defined(FEAT_CONCEAL) - if (conceal_update_lines - && (conceal_old_cursor_line != conceal_new_cursor_line - || conceal_cursor_line(curwin) - || need_cursor_line_redraw)) - { - mch_disable_flush(); /* Stop issuing gui_mch_flush(). */ - if (conceal_old_cursor_line != conceal_new_cursor_line - && conceal_old_cursor_line - <= curbuf->b_ml.ml_line_count) - update_single_line(curwin, conceal_old_cursor_line); - update_single_line(curwin, conceal_new_cursor_line); - mch_enable_flush(); - curwin->w_valid &= ~VALID_CROW; - } -#endif setcursor(); cursor_on(); -- cgit v1.2.1