summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-04-17 21:20:51 +0800
committerGitHub <noreply@github.com>2026-04-17 21:20:51 +0800
commit724fccd46f39cb47d4d1e6da850d6b64ff00347d (patch)
treeb613b02519e8de5700263e82428e4dacf41ec988 /src
parentfefad0721a9d55a9bee352ceeec48c452e1d1802 (diff)
fix(completion): update CursorColumn during completion (#39159)
Since Nvim uses a compositor, redrawing windows won't lead to flicker in the popup menu, so the pum_visible() checks in move.c can be removed.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/drawscreen.c4
-rw-r--r--src/nvim/move.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index e6d93ac456..4cf8fc664c 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -1466,6 +1466,10 @@ static void win_update(win_T *wp)
}
buf->b_signcols.last_max = buf->b_signcols.max;
+ // Validate w_virtcol here as it can change the redraw type.
+ validate_virtcol(wp);
+ type = wp->w_redr_type;
+
init_search_hl(wp, &screen_search_hl);
// Make sure skipcol is valid, it depends on various options and the window
diff --git a/src/nvim/move.c b/src/nvim/move.c
index dda59db82c..219b8c8642 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -42,7 +42,6 @@
#include "nvim/option.h"
#include "nvim/option_vars.h"
#include "nvim/plines.h"
-#include "nvim/popupmenu.h"
#include "nvim/pos_defs.h"
#include "nvim/strings.h"
#include "nvim/types_defs.h"
@@ -141,8 +140,11 @@ static void comp_botline(win_T *wp)
static void redraw_for_cursorline(win_T *wp)
FUNC_ATTR_NONNULL_ALL
{
- if ((wp->w_valid & VALID_CROW) == 0 && !pum_visible()
- && (wp->w_p_rnu || win_cursorline_standout(wp))) {
+ if (wp->w_valid & VALID_CROW) {
+ return;
+ }
+
+ if (wp->w_p_rnu || win_cursorline_standout(wp)) {
// win_line() will redraw the number column and cursorline only.
redraw_later(wp, UPD_VALID);
}
@@ -161,7 +163,7 @@ static void redraw_for_cursorcolumn(win_T *wp)
redrawWinline(wp, wp->w_cursor.lnum);
}
- if ((wp->w_valid & VALID_VIRTCOL) || pum_visible()) {
+ if (wp->w_valid & VALID_VIRTCOL) {
return;
}