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:
glepnir
2025-04-23 20:22:43 +08:00
committed by GitHub
parent 70d7979439
commit d4f2b9050d
5 changed files with 225 additions and 3 deletions

View File

@ -1848,7 +1848,8 @@ function vim.api.nvim_open_term(buffer, opts) end
--- 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".
--- @return integer # |window-ID|, or 0 on error