aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-01-11 12:30:17 +0100
committerGitHub <noreply@github.com>2019-01-11 12:30:17 +0100
commit8853fca1fdc5ee3a2aea3eb3e772e091946a3a71 (patch)
tree795d73cfbc14ffdd3615e48bd19baeb0a830ec3f /src/nvim/normal.c
parent10f29f79f4e8240254b916160ae5bb17ff56d161 (diff)
parent889f73e8618458ed46050e26cac0dee30a19b4f4 (diff)
downloadrneovim-8853fca1fdc5ee3a2aea3eb3e772e091946a3a71.tar.gz
rneovim-8853fca1fdc5ee3a2aea3eb3e772e091946a3a71.tar.bz2
rneovim-8853fca1fdc5ee3a2aea3eb3e772e091946a3a71.zip
Merge pull request #9484 from bfredl/highlander
screen: make update_screen() the only entry point for redrawing
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 29c5d27258..9b2543cb8f 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1246,6 +1246,25 @@ static void normal_redraw(NormalState *s)
update_topline();
validate_cursor();
+ // TODO(bfredl): this logic is only used for 'concealcursor', not
+ // 'cursorline'. Maybe we can eliminate this check (and in edit.c) by
+ // checking for 'concealcursor' wherever we check for 'cursorline'
+ if (s->conceal_update_lines
+ && (s->conceal_old_cursor_line !=
+ s->conceal_new_cursor_line
+ || conceal_cursor_line(curwin)
+ || need_cursor_line_redraw)) {
+ if (s->conceal_old_cursor_line !=
+ s->conceal_new_cursor_line
+ && s->conceal_old_cursor_line <=
+ curbuf->b_ml.ml_line_count) {
+ redrawWinline(curwin, s->conceal_old_cursor_line);
+ }
+
+ redrawWinline(curwin, s->conceal_new_cursor_line);
+ curwin->w_valid &= ~VALID_CROW;
+ }
+
if (VIsual_active) {
update_curbuf(INVERTED); // update inverted part
} else if (must_redraw) {
@@ -1281,22 +1300,6 @@ static void normal_redraw(NormalState *s)
may_clear_sb_text(); // clear scroll-back text on next msg
showruler(false);
- if (s->conceal_update_lines
- && (s->conceal_old_cursor_line !=
- s->conceal_new_cursor_line
- || conceal_cursor_line(curwin)
- || need_cursor_line_redraw)) {
- if (s->conceal_old_cursor_line !=
- s->conceal_new_cursor_line
- && s->conceal_old_cursor_line <=
- curbuf->b_ml.ml_line_count) {
- update_single_line(curwin, s->conceal_old_cursor_line);
- }
-
- update_single_line(curwin, s->conceal_new_cursor_line);
- curwin->w_valid &= ~VALID_CROW;
- }
-
setcursor();
}
@@ -7089,7 +7092,7 @@ static void n_opencmd(cmdarg_T *cap)
? OPENLINE_DO_COM : 0,
0)) {
if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum) {
- update_single_line(curwin, oldline);
+ redrawWinline(curwin, oldline);
}
if (curwin->w_p_cul) {
// force redraw of cursorline