[vim/vim] `WinNew` to provide window-ID (Issue #10633)

6 views
Skip to first unread message

Sergey Vlasov

unread,
Jun 28, 2022, 8:30:55 AM6/28/22
to vim/vim, Subscribed

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
It is impossible to get an ID of the new window when WinNew is triggered, <amatch> expands to an empty string.

Describe the solution you'd like
Allow expanding <amatch> to window-ID during WinNew, similar to how WinClosed works.

Describe alternatives you've considered
Iterating through all windows and sorting by window ID. The largest ID supposedly belongs the new window.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10633@github.com>

Bram Moolenaar

unread,
Oct 5, 2022, 2:32:51 PM10/5/22
to vim/vim, Subscribed

You can get the Window ID with win_getid():
au WinNew * echomsg win_getid()

Is there a reason you cannot use that?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10633/1268799287@github.com>

Sergey Vlasov

unread,
Oct 5, 2022, 4:07:46 PM10/5/22
to vim/vim, Subscribed

Closed #10633 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/10633/issue_event/7528178812@github.com>

Sergey Vlasov

unread,
Oct 5, 2022, 4:07:46 PM10/5/22
to vim/vim, Subscribed

Yes, win_getid() works.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10633/1268914339@github.com>

Reply all
Reply to author
Forward
0 new messages