mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
fix(statusline): redraw when VIsual_mode changes (#23933)
This commit is contained in:
@@ -1292,8 +1292,9 @@ struct window_S {
|
||||
linenr_T w_stl_line_count; // line count when last redrawn
|
||||
int w_stl_topfill; // topfill when last redrawn
|
||||
char w_stl_empty; // true if elements show 0-1 (empty line)
|
||||
int w_stl_state; // State when last redrawn
|
||||
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
|
||||
|
||||
int w_alt_fnum; // alternate file (for # and CTRL-^)
|
||||
|
||||
|
@@ -839,7 +839,8 @@ void show_cursor_info_later(bool force)
|
||||
|| curwin->w_topfill != curwin->w_stl_topfill
|
||||
|| empty_line != curwin->w_stl_empty
|
||||
|| reg_recording != curwin->w_stl_recording
|
||||
|| state != curwin->w_stl_state) {
|
||||
|| state != curwin->w_stl_state
|
||||
|| (VIsual_active && VIsual_mode != curwin->w_stl_visual_mode)) {
|
||||
if (curwin->w_status_height || global_stl_height()) {
|
||||
curwin->w_redr_status = true;
|
||||
} else {
|
||||
@@ -862,8 +863,11 @@ void show_cursor_info_later(bool force)
|
||||
curwin->w_stl_topline = curwin->w_topline;
|
||||
curwin->w_stl_line_count = curwin->w_buffer->b_ml.ml_line_count;
|
||||
curwin->w_stl_topfill = curwin->w_topfill;
|
||||
curwin->w_stl_state = state;
|
||||
curwin->w_stl_recording = reg_recording;
|
||||
curwin->w_stl_state = state;
|
||||
if (VIsual_active) {
|
||||
curwin->w_stl_visual_mode = VIsual_mode;
|
||||
}
|
||||
}
|
||||
|
||||
/// @return true when postponing displaying the mode message: when not redrawing
|
||||
|
Reference in New Issue
Block a user