mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
fix(messages): make swapfile attention message part of prompt (#34414)
Problem: The swapfile attention message is not repeated after clearing the screen. After clearing the screen `msg_scrolled` is reset without clearing other related variables, causing an assert. Solution: Make the attention message part of the confirm prompt. Call `msg_reset_scroll()`.
This commit is contained in:
@@ -255,7 +255,7 @@ void screenclear(void)
|
||||
compute_cmdrow();
|
||||
msg_row = cmdline_row; // put cursor on last line for messages
|
||||
msg_col = 0;
|
||||
msg_scrolled = 0; // can't scroll back
|
||||
msg_reset_scroll(); // can't scroll back
|
||||
msg_didany = false;
|
||||
msg_didout = false;
|
||||
if (HL_ATTR(HLF_MSG) > 0 && msg_use_grid() && msg_grid.chars) {
|
||||
@@ -500,7 +500,7 @@ int update_screen(void)
|
||||
}
|
||||
|
||||
// if the screen was scrolled up when displaying a message, scroll it down
|
||||
if ((msg_scrolled || msg_grid_invalid) && !cmdline_number_prompt()) {
|
||||
if (msg_scrolled || msg_grid_invalid) {
|
||||
clear_cmdline = true;
|
||||
int valid = MAX(Rows - msg_scrollsize(), 0);
|
||||
if (msg_grid.chars) {
|
||||
|
Reference in New Issue
Block a user