1. bufnr() is unique, but winnr() and tabpagenr() are not.. I feel that this is confusing and unexpected from the point of view of someone creating a vim script.
2. The real problem for me is that find_win_by_winnr(4,null) returns the fourth window in the current page. I can't find and work with a specific window.
>
>
>
> At the very least, you should certainly not REPLACE the existing window number. The window number is set in a predictable way and can be used to switch to specific windows with <C-W><C-W>. Making the window number unique and static would make this impossible without first calling a function to figure out what the window number is.
This patch should create the function uwinnr(), leaving winnr() alone.
It seems like there should be a standard way of finding a window/buffer/tabpage without every script creating a new way of looping through windows. Having said that, I can understand the need to keep bloat out of the project.
I will loop through windows.
Brandon