From 8636848e6348bb0e38cd6aaaadbe61e15181bc8f Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 17 Aug 2023 14:10:28 +0000 Subject: Add a session, pane and user mouse range types for the status line and add format variables for mouse_status_line and mouse_status_range so they can be associated with different commands in the key bindings. GitHub issue 3652. --- tmux.1 | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) (limited to 'tmux.1') diff --git a/tmux.1 b/tmux.1 index 8191b6dc..7836e5f5 100644 --- a/tmux.1 +++ b/tmux.1 @@ -5443,6 +5443,8 @@ The following variables are available, where appropriate: .It Li "mouse_line" Ta "" Ta "Line under mouse, if any" .It Li "mouse_sgr_flag" Ta "" Ta "Pane mouse SGR flag" .It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag" +.It Li "mouse_status_line" Ta "" Ta "Status line on which mouse event took place" +.It Li "mouse_status_range" Ta "" Ta "Range type or argument of mouse event on status line" .It Li "mouse_utf8_flag" Ta "" Ta "Pane mouse UTF-8 flag" .It Li "mouse_word" Ta "" Ta "Word under mouse, if any" .It Li "mouse_x" Ta "" Ta "Mouse X position, if any" @@ -5681,26 +5683,56 @@ Only one default may be pushed (each replaces the previous saved default). .It Xo Ic range=left , .Ic range=right , +.Ic range=session|X , .Ic range=window|X , +.Ic range=pane|X , +.Ic range=user|X , .Ic norange .Xc -Mark a range in the +Mark a range for mouse events in the .Ic status-format option. +When a mouse event occurs in the .Ic range=left -and +or .Ic range=right -are the text used for the +range, the .Ql StatusLeft and .Ql StatusRight -mouse keys. +key bindings are triggered. +.Pp +.Ic range=session|X , .Ic range=window|X -is the range for a window passed to the +and +.Ic range=pane|X +are ranges for a session, window or pane. +These trigger the .Ql Status -mouse key, where +mouse key with the target session, window or pane given by the +.Ql X +argument. +.Ql X +is a session ID, window index in the current session or a pane ID. +For these, the +.Ic mouse_status_range +format variable will be set to +.Ql session , +.Ql window +or +.Ql pane . +.Pp +.Ic range=user|X +is a user-defined range; it triggers the +.Ql Status +mouse key. +The argument +.Ql X +will be available in the +.Ic mouse_status_range +format variable. .Ql X -is a window index. +must be at most 15 bytes in length. .El .Pp Examples are: -- cgit v1.2.3