mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(ui): recording change doesn't trigger statusline redraw
This commit is contained in:
@@ -1288,6 +1288,7 @@ struct window_S {
|
|||||||
int w_stl_topfill; // topfill when last redrawn
|
int w_stl_topfill; // topfill when last redrawn
|
||||||
char w_stl_empty; // true if elements show 0-1 (empty line)
|
char w_stl_empty; // true if elements show 0-1 (empty line)
|
||||||
int w_stl_state; // State when last redrawn
|
int w_stl_state; // State when last redrawn
|
||||||
|
int w_stl_recording; // reg_recording when last redrawn
|
||||||
|
|
||||||
int w_alt_fnum; // alternate file (for # and CTRL-^)
|
int w_alt_fnum; // alternate file (for # and CTRL-^)
|
||||||
|
|
||||||
|
@@ -827,6 +827,7 @@ void show_cursor_info_later(bool force)
|
|||||||
|| curwin->w_buffer->b_ml.ml_line_count != curwin->w_stl_line_count
|
|| curwin->w_buffer->b_ml.ml_line_count != curwin->w_stl_line_count
|
||||||
|| curwin->w_topfill != curwin->w_stl_topfill
|
|| curwin->w_topfill != curwin->w_stl_topfill
|
||||||
|| empty_line != curwin->w_stl_empty
|
|| empty_line != curwin->w_stl_empty
|
||||||
|
|| reg_recording != curwin->w_stl_recording
|
||||||
|| state != curwin->w_stl_state) {
|
|| state != curwin->w_stl_state) {
|
||||||
if (curwin->w_status_height || global_stl_height()) {
|
if (curwin->w_status_height || global_stl_height()) {
|
||||||
curwin->w_redr_status = true;
|
curwin->w_redr_status = true;
|
||||||
@@ -851,6 +852,7 @@ void show_cursor_info_later(bool force)
|
|||||||
curwin->w_stl_line_count = curwin->w_buffer->b_ml.ml_line_count;
|
curwin->w_stl_line_count = curwin->w_buffer->b_ml.ml_line_count;
|
||||||
curwin->w_stl_topfill = curwin->w_topfill;
|
curwin->w_stl_topfill = curwin->w_topfill;
|
||||||
curwin->w_stl_state = state;
|
curwin->w_stl_state = state;
|
||||||
|
curwin->w_stl_recording = reg_recording;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @return true when postponing displaying the mode message: when not redrawing
|
/// @return true when postponing displaying the mode message: when not redrawing
|
||||||
|
@@ -622,3 +622,17 @@ it('K_EVENT does not trigger a statusline redraw unnecessarily', function()
|
|||||||
sleep(50)
|
sleep(50)
|
||||||
eq(1, eval('g:counter < 50'), 'g:counter=' .. eval('g:counter'))
|
eq(1, eval('g:counter < 50'), 'g:counter=' .. eval('g:counter'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('statusline is redrawn on recording state change #22683', function()
|
||||||
|
clear()
|
||||||
|
local screen = Screen.new(40, 4)
|
||||||
|
screen:attach()
|
||||||
|
command('set ls=2 stl=%{repeat(reg_recording(),5)}')
|
||||||
|
feed('qQ')
|
||||||
|
screen:expect([[
|
||||||
|
^ |
|
||||||
|
~ |
|
||||||
|
QQQQQ |
|
||||||
|
recording @Q |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
Reference in New Issue
Block a user