diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-10-23 11:27:23 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-23 11:27:23 +0800 |
| commit | af0f7b59b1fcd92e64841cb5da8a577e944ce5bb (patch) | |
| tree | 7102ded742bb0e206dc54948e3cfdf153993daad /src | |
| parent | 323d5527eed6a7c75e795570431a3292b92c1148 (diff) | |
| download | rneovim-af0f7b59b1fcd92e64841cb5da8a577e944ce5bb.tar.gz rneovim-af0f7b59b1fcd92e64841cb5da8a577e944ce5bb.tar.bz2 rneovim-af0f7b59b1fcd92e64841cb5da8a577e944ce5bb.zip | |
fix(statusline): redraw if Visual selection other end changes (#36281)
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/buffer_defs.h | 1 | ||||
| -rw-r--r-- | src/nvim/drawscreen.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index d936fc6aac..16ccd0c466 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -1295,6 +1295,7 @@ struct window_S { int w_stl_recording; // reg_recording when last redrawn int w_stl_state; // get_real_state() when last redrawn int w_stl_visual_mode; // VIsual_mode when last redrawn + pos_T w_stl_visual_pos; // VIsual when last redrawn int w_alt_fnum; // alternate file (for # and CTRL-^) diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index be8c07aa4e..832a4a9f5a 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -810,7 +810,10 @@ void show_cursor_info_later(bool force) || empty_line != curwin->w_stl_empty || reg_recording != curwin->w_stl_recording || state != curwin->w_stl_state - || (VIsual_active && VIsual_mode != curwin->w_stl_visual_mode)) { + || (VIsual_active && (VIsual_mode != curwin->w_stl_visual_mode + || VIsual.lnum != curwin->w_stl_visual_pos.lnum + || VIsual.col != curwin->w_stl_visual_pos.col + || VIsual.coladd != curwin->w_stl_visual_pos.coladd))) { if (curwin->w_status_height || global_stl_height()) { curwin->w_redr_status = true; } else { @@ -834,6 +837,7 @@ void show_cursor_info_later(bool force) curwin->w_stl_state = state; if (VIsual_active) { curwin->w_stl_visual_mode = VIsual_mode; + curwin->w_stl_visual_pos = VIsual; } } |