$window-id(5)$window-id - Current window identity
$window-id - Previous window identity
$window-id integer
$window-pid integer
$window-id retrieves the identity of the current window, this is a integer value (1..n) that is automatically allocated when a window is created using split-window-horizontally(2) or split-window-vertically(2).
The $window-id is guaranteed to be unique and is typically used in macros to locate a previous window.
The $window-pid stores the $window-id of the previous current window, defaulting to 0 if no other window has been visited. Note that the window identified by $window-pid may no longer exist so any macro making use of this variable must handle the failed to find case.
Ref: $window-id(5) File: m5var087.5 Date: 2026/08/12
(c) Copyright JASSPA 2026