mirror of
https://github.com/neovim/neovim.git
synced 2025-12-18 12:25:34 +00:00
fix(terminal): avoid tailed cursor in focused terminal in events
Problem: in terminal mode, adjust_topline moves curwin's cursor to the last row so set_topline tails the non-scrollback area. This may result in the observed cursor position remaining tailed in events within the focused terminal, rather than reflecting the actual cursor position. Solution: use the focused terminal's actual cursor position immediately, rather than relying on the next terminal_check_cursor call in terminal_check to set it. Note: Maybe also possible for terminal mode cursor position to be stale (reporting the normal mode position) when switching buffers in events to another terminal until the next terminal_check call? (or until refresh_terminal is called for it) Maybe not worth fixing that, though.
This commit is contained in:
@@ -2187,7 +2187,7 @@ void mb_adjust_cursor(void)
|
||||
}
|
||||
|
||||
/// Checks and adjusts cursor column. Not mode-dependent.
|
||||
/// @see check_cursor_col_win
|
||||
/// @see check_cursor_col
|
||||
///
|
||||
/// @param win_ Places cursor on a valid column for this window.
|
||||
void mb_check_adjust_col(void *win_)
|
||||
|
||||
Reference in New Issue
Block a user