Skip to content

Conversation

@perrin4869
Copy link

This pull request is necessary due to recent changes in Neovim nightly which introduced native support for statuslines on floating windows (e.g., neovim/neovim#36521). I could observe statuslines being drawn on telescope prompts and notify.nvim prompts in nightly due to that commit.

It is now not reliable to check for nvim_win_get_config(0).focusable at all, because floating windows are focusable by default, and that will cause the statusline to be drawn under them.
Also, we need to check for skippability of windows before calling setwinvar(n, '&statusline', s[n!=w]) to prevent a statusline being drawn on floating windows that are not in focus, so I added an optional winid variable to the s:skip function.

@perrin4869
Copy link
Author

I guess another approach would be to use the existing nvim api to filter out floating windows, similar to: https://github.com/carbon-steel/detour.nvim/blob/204f61e64f87c7c6fd4ef4a387631c9a9efc2573/lua/detour/util.lua#L85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant