mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(eval): winnr('$') counts non-current hidden/unfocusable windows #34207
Problem: Non-visible/focusable windows are assigned a window number,
whereas commands that use this window number skip over them.
Solution: Skip over non-visible/focusable windows when computing
the window number, unless it is made the current window
through the API in which case an identifiable window number
is still useful. This also ensures it matches the window
number of the window entered by `<winnr>wincmd w` since
403fcacf
.
This commit is contained in:
@ -13347,7 +13347,8 @@ M.funcs = {
|
||||
desc = [=[
|
||||
The result is a Number, which is the number of the current
|
||||
window. The top window has number 1.
|
||||
Returns zero for a popup window.
|
||||
Returns zero for a hidden or non |focusable| window, unless
|
||||
it is the current window.
|
||||
|
||||
The optional argument {arg} supports the following values:
|
||||
$ the number of the last window (the window
|
||||
|
Reference in New Issue
Block a user