diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-28 06:45:15 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-03-28 10:23:32 +0800 |
commit | 595c1a724af9fe93d4ff1df7d5c47e4c9c31a7a6 (patch) | |
tree | 3bd554afdfe7b9f51296e49cb4d3fb5d650b3cb8 /src/nvim/edit.c | |
parent | 9ce2c73180b741a7969ede940c3c439d0cc9010d (diff) | |
download | rneovim-595c1a724af9fe93d4ff1df7d5c47e4c9c31a7a6.tar.gz rneovim-595c1a724af9fe93d4ff1df7d5c47e4c9c31a7a6.tar.bz2 rneovim-595c1a724af9fe93d4ff1df7d5c47e4c9c31a7a6.zip |
perf: only redraw concealed line if cursor has moved horizontally
Building upon #17889, this moves conceal redrawing logic into move.c, so
that concealed line is only redrawn if cursor has moved horizontally.
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index c087948810..815d57121b 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -1480,8 +1480,6 @@ bool edit(int cmdchar, bool startln, long count) /// @param ready not busy with something static void ins_redraw(bool ready) { - bool conceal_cursor_moved = false; - if (char_avail()) { return; } @@ -1504,7 +1502,6 @@ static void ins_redraw(bool ready) update_curswant(); ins_apply_autocmds(EVENT_CURSORMOVEDI); } - conceal_cursor_moved = true; curwin->w_last_cursormoved = curwin->w_cursor; } @@ -1560,11 +1557,6 @@ static void ins_redraw(bool ready) curbuf->b_changed_invalid = false; } - if (curwin->w_p_cole > 0 && conceal_cursor_line(curwin) - && conceal_cursor_moved) { - redrawWinline(curwin, curwin->w_cursor.lnum); - } - pum_check_clear(); if (must_redraw) { update_screen(0); |