fix(messages): ensure msg_grid is at top at more prompt (#23584)

This commit is contained in:
zeertzjq
2023-05-17 21:06:27 +08:00
committed by GitHub
parent 67176c3f20
commit c9f47fca8b
2 changed files with 31 additions and 3 deletions

View File

@@ -181,7 +181,7 @@ void msg_grid_validate(void)
msg_grid.dirty_col = xcalloc((size_t)Rows, sizeof(*msg_grid.dirty_col));
// Tricky: allow resize while pager or ex mode is active
int pos = MAX(max_rows - msg_scrolled, 0);
int pos = (State & MODE_ASKMORE) ? 0 : MAX(max_rows - msg_scrolled, 0);
msg_grid.throttled = false; // don't throttle in 'cmdheight' area
msg_grid_set_pos(pos, msg_scrolled);
ui_comp_put_grid(&msg_grid, pos, 0, msg_grid.rows, msg_grid.cols,