summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-11 20:45:36 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-11 20:45:36 +0100
commit535d5b653a1eddf49ee11dc9639c5355ef023301 (patch)
tree108a023a948f57b7620d2cad3c4931c58f21706c /src/main.c
parent465e8b5985908596261cef9d671024ed8ded1ce3 (diff)
downloadvim-git-535d5b653a1eddf49ee11dc9639c5355ef023301.tar.gz
patch 8.1.0726: redrawing specifically for conceal featurev8.1.0726
Problem: Redrawing specifically for conceal feature. Solution: Use generic redrawing methods.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c32
1 files changed, 16 insertions, 16 deletions
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();