mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
fix(float): cursor visible in "hidden" floating window #30866
Problem: Cursor is visible in "hidden" floating window. Solution: Hide cursor when curwin is a hidden floating window. Show cursor after returning to a normal (non-hidden) window.
This commit is contained in:
@ -201,7 +201,8 @@
|
||||
/// the call.
|
||||
/// - fixed: If true when anchor is NW or SW, the float window
|
||||
/// would be kept fixed even if the window would be truncated.
|
||||
/// - hide: If true the floating window will be hidden.
|
||||
/// - hide: If true the floating window will be hidden and the cursor will be invisible when
|
||||
/// focused on it.
|
||||
/// - vertical: Split vertically |:vertical|.
|
||||
/// - split: Split direction: "left", "right", "above", "below".
|
||||
///
|
||||
|
@ -539,7 +539,21 @@ void ui_flush(void)
|
||||
if (!ui_active()) {
|
||||
return;
|
||||
}
|
||||
|
||||
static bool was_busy = false;
|
||||
|
||||
cmdline_ui_flush();
|
||||
|
||||
if (State != MODE_CMDLINE && curwin->w_floating && curwin->w_config.hide) {
|
||||
if (!was_busy) {
|
||||
ui_call_busy_start();
|
||||
was_busy = true;
|
||||
}
|
||||
} else if (was_busy) {
|
||||
ui_call_busy_stop();
|
||||
was_busy = false;
|
||||
}
|
||||
|
||||
win_ui_flush(false);
|
||||
msg_ext_ui_flush();
|
||||
msg_scroll_flush();
|
||||
|
Reference in New Issue
Block a user