fix(neovim): floating windows can now have statuslines #698
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).focusableat 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 thes:skipfunction.