NetBSD/external/bsd/tmux/dist/window-tree.c

1342 lines
31 KiB
C
Raw Permalink Normal View History

CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
/* $OpenBSD$ */
/*
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
2019-01-06 00:44:40 +03:00
#include <ctype.h>
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
#include <stdlib.h>
#include <string.h>
#include "tmux.h"
2019-11-13 00:02:28 +03:00
static struct screen *window_tree_init(struct window_mode_entry *,
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
struct cmd_find_state *, struct args *);
2019-11-13 00:02:28 +03:00
static void window_tree_free(struct window_mode_entry *);
static void window_tree_resize(struct window_mode_entry *, u_int,
u_int);
static void window_tree_update(struct window_mode_entry *);
2019-11-13 00:02:28 +03:00
static void window_tree_key(struct window_mode_entry *,
struct client *, struct session *,
struct winlink *, key_code, struct mouse_event *);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
2020-11-01 18:16:04 +03:00
#define WINDOW_TREE_DEFAULT_COMMAND "switch-client -Zt '%%'"
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
#define WINDOW_TREE_DEFAULT_FORMAT \
"#{?pane_format," \
"#{?pane_marked,#[reverse],}" \
"#{pane_current_command}#{?pane_active,*,}#{?pane_marked,M,}" \
"#{?#{&&:#{pane_title},#{!=:#{pane_title},#{host_short}}},: \"#{pane_title}\",}" \
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
"," \
"#{?window_format," \
"#{?window_marked_flag,#[reverse],}" \
"#{window_name}#{window_flags}" \
"#{?#{&&:#{==:#{window_panes},1},#{&&:#{pane_title},#{!=:#{pane_title},#{host_short}}}},: \"#{pane_title}\",}" \
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
"," \
"#{session_windows} windows" \
2019-01-06 00:44:40 +03:00
"#{?session_grouped, " \
"(group #{session_group}: " \
"#{session_group_list})," \
"}" \
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
"#{?session_attached, (attached),}" \
"}" \
"}"
#define WINDOW_TREE_DEFAULT_KEY_FORMAT \
"#{?#{e|<:#{line},10}," \
"#{line}" \
"," \
"#{?#{e|<:#{line},36}," \
"M-#{a:#{e|+:97,#{e|-:#{line},10}}}" \
"," \
"" \
"}" \
"}"
2020-01-07 00:03:23 +03:00
static const struct menu_item window_tree_menu_items[] = {
{ "Select", '\r', NULL },
{ "Expand", KEYC_RIGHT, NULL },
{ "Mark", 'm', NULL },
2020-01-07 00:03:23 +03:00
{ "", KEYC_NONE, NULL },
{ "Tag", 't', NULL },
{ "Tag All", '\024', NULL },
{ "Tag None", 'T', NULL },
{ "", KEYC_NONE, NULL },
{ "Kill", 'x', NULL },
{ "Kill Tagged", 'X', NULL },
{ "", KEYC_NONE, NULL },
{ "Cancel", 'q', NULL },
{ NULL, KEYC_NONE, NULL }
};
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
const struct window_mode window_tree_mode = {
.name = "tree-mode",
2019-11-13 00:02:28 +03:00
.default_format = WINDOW_TREE_DEFAULT_FORMAT,
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
.init = window_tree_init,
.free = window_tree_free,
.resize = window_tree_resize,
.update = window_tree_update,
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
.key = window_tree_key,
};
enum window_tree_sort_type {
WINDOW_TREE_BY_INDEX,
WINDOW_TREE_BY_NAME,
WINDOW_TREE_BY_TIME,
};
static const char *window_tree_sort_list[] = {
"index",
"name",
"time"
};
2020-11-01 18:16:04 +03:00
static struct mode_tree_sort_criteria *window_tree_sort;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
enum window_tree_type {
WINDOW_TREE_NONE,
WINDOW_TREE_SESSION,
WINDOW_TREE_WINDOW,
WINDOW_TREE_PANE,
};
struct window_tree_itemdata {
enum window_tree_type type;
int session;
int winlink;
int pane;
};
struct window_tree_modedata {
struct window_pane *wp;
int dead;
int references;
struct mode_tree_data *data;
char *format;
char *key_format;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
char *command;
2019-01-06 00:44:40 +03:00
int squash_groups;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
struct window_tree_itemdata **item_list;
u_int item_size;
const char *entered;
struct cmd_find_state fs;
enum window_tree_type type;
int offset;
2019-01-06 00:44:40 +03:00
int left;
int right;
u_int start;
u_int end;
u_int each;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
};
static void
window_tree_pull_item(struct window_tree_itemdata *item, struct session **sp,
struct winlink **wlp, struct window_pane **wp)
{
*wp = NULL;
*wlp = NULL;
*sp = session_find_by_id(item->session);
if (*sp == NULL)
return;
if (item->type == WINDOW_TREE_SESSION) {
*wlp = (*sp)->curw;
*wp = (*wlp)->window->active;
return;
}
*wlp = winlink_find_by_index(&(*sp)->windows, item->winlink);
if (*wlp == NULL) {
*sp = NULL;
return;
}
if (item->type == WINDOW_TREE_WINDOW) {
*wp = (*wlp)->window->active;
return;
}
*wp = window_pane_find_by_id(item->pane);
if (!window_has_pane((*wlp)->window, *wp))
*wp = NULL;
if (*wp == NULL) {
*sp = NULL;
*wlp = NULL;
return;
}
}
static struct window_tree_itemdata *
window_tree_add_item(struct window_tree_modedata *data)
{
struct window_tree_itemdata *item;
data->item_list = xreallocarray(data->item_list, data->item_size + 1,
sizeof *data->item_list);
item = data->item_list[data->item_size++] = xcalloc(1, sizeof *item);
return (item);
}
static void
window_tree_free_item(struct window_tree_itemdata *item)
{
free(item);
}
static int
2020-11-01 18:16:04 +03:00
window_tree_cmp_session(const void *a0, const void *b0)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
2020-11-01 18:16:04 +03:00
const struct session *const *a = a0;
const struct session *const *b = b0;
const struct session *sa = *a;
const struct session *sb = *b;
int result = 0;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
2020-11-01 18:16:04 +03:00
switch (window_tree_sort->field) {
case WINDOW_TREE_BY_INDEX:
result = sa->id - sb->id;
break;
case WINDOW_TREE_BY_TIME:
if (timercmp(&sa->activity_time, &sb->activity_time, >)) {
result = -1;
break;
}
if (timercmp(&sa->activity_time, &sb->activity_time, <)) {
result = 1;
break;
}
/* FALLTHROUGH */
case WINDOW_TREE_BY_NAME:
result = strcmp(sa->name, sb->name);
break;
}
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
2020-11-01 18:16:04 +03:00
if (window_tree_sort->reversed)
result = -result;
return (result);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
}
static int
2020-11-01 18:16:04 +03:00
window_tree_cmp_window(const void *a0, const void *b0)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
2020-11-01 18:16:04 +03:00
const struct winlink *const *a = a0;
const struct winlink *const *b = b0;
const struct winlink *wla = *a;
const struct winlink *wlb = *b;
struct window *wa = wla->window;
struct window *wb = wlb->window;
int result = 0;
switch (window_tree_sort->field) {
case WINDOW_TREE_BY_INDEX:
result = wla->idx - wlb->idx;
break;
case WINDOW_TREE_BY_TIME:
if (timercmp(&wa->activity_time, &wb->activity_time, >)) {
result = -1;
break;
}
if (timercmp(&wa->activity_time, &wb->activity_time, <)) {
result = 1;
break;
}
/* FALLTHROUGH */
case WINDOW_TREE_BY_NAME:
result = strcmp(wa->name, wb->name);
break;
}
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
2020-11-01 18:16:04 +03:00
if (window_tree_sort->reversed)
result = -result;
return (result);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
}
static int
2020-11-01 18:16:04 +03:00
window_tree_cmp_pane(const void *a0, const void *b0)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
2020-11-01 18:16:04 +03:00
const struct window_pane *const *a = a0;
const struct window_pane *const *b = b0;
int result;
if (window_tree_sort->field == WINDOW_TREE_BY_TIME)
result = (*a)->active_point - (*b)->active_point;
else {
/*
* Panes don't have names, so use number order for any other
* sort field.
*/
result = (*a)->id - (*b)->id;
}
if (window_tree_sort->reversed)
result = -result;
return (result);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
}
static void
window_tree_build_pane(struct session *s, struct winlink *wl,
struct window_pane *wp, void *modedata, struct mode_tree_item *parent)
{
struct window_tree_modedata *data = modedata;
struct window_tree_itemdata *item;
char *name, *text;
u_int idx;
window_pane_index(wp, &idx);
item = window_tree_add_item(data);
item->type = WINDOW_TREE_PANE;
item->session = s->id;
item->winlink = wl->idx;
item->pane = wp->id;
text = format_single(NULL, data->format, NULL, s, wl, wp);
xasprintf(&name, "%u", idx);
mode_tree_add(data->data, parent, item, (uintptr_t)wp, name, text, -1);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
free(text);
free(name);
}
static int
window_tree_filter_pane(struct session *s, struct winlink *wl,
struct window_pane *wp, const char *filter)
{
char *cp;
int result;
if (filter == NULL)
return (1);
cp = format_single(NULL, filter, NULL, s, wl, wp);
result = format_true(cp);
free(cp);
return (result);
}
static int
2020-11-01 18:16:04 +03:00
window_tree_build_window(struct session *s, struct winlink *wl,
void *modedata, struct mode_tree_sort_criteria *sort_crit,
struct mode_tree_item *parent, const char *filter)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
struct window_tree_modedata *data = modedata;
struct window_tree_itemdata *item;
struct mode_tree_item *mti;
char *name, *text;
struct window_pane *wp, **l;
u_int n, i;
int expanded;
item = window_tree_add_item(data);
item->type = WINDOW_TREE_WINDOW;
item->session = s->id;
item->winlink = wl->idx;
item->pane = -1;
text = format_single(NULL, data->format, NULL, s, wl, NULL);
xasprintf(&name, "%u", wl->idx);
if (data->type == WINDOW_TREE_SESSION ||
data->type == WINDOW_TREE_WINDOW)
expanded = 0;
else
expanded = 1;
mti = mode_tree_add(data->data, parent, item, (uintptr_t)wl, name, text,
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
expanded);
free(text);
free(name);
2019-01-06 00:44:40 +03:00
if ((wp = TAILQ_FIRST(&wl->window->panes)) == NULL)
goto empty;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
if (TAILQ_NEXT(wp, entry) == NULL) {
if (!window_tree_filter_pane(s, wl, wp, filter))
goto empty;
return (1);
}
l = NULL;
n = 0;
TAILQ_FOREACH(wp, &wl->window->panes, entry) {
if (!window_tree_filter_pane(s, wl, wp, filter))
continue;
l = xreallocarray(l, n + 1, sizeof *l);
l[n++] = wp;
}
if (n == 0)
goto empty;
2020-11-01 18:16:04 +03:00
window_tree_sort = sort_crit;
qsort(l, n, sizeof *l, window_tree_cmp_pane);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
for (i = 0; i < n; i++)
window_tree_build_pane(s, wl, l[i], modedata, mti);
free(l);
return (1);
empty:
window_tree_free_item(item);
data->item_size--;
mode_tree_remove(data->data, mti);
return (0);
}
static void
2020-11-01 18:16:04 +03:00
window_tree_build_session(struct session *s, void *modedata,
struct mode_tree_sort_criteria *sort_crit, const char *filter)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
struct window_tree_modedata *data = modedata;
struct window_tree_itemdata *item;
struct mode_tree_item *mti;
char *text;
struct winlink *wl, **l;
u_int n, i, empty;
int expanded;
item = window_tree_add_item(data);
item->type = WINDOW_TREE_SESSION;
item->session = s->id;
item->winlink = -1;
item->pane = -1;
text = format_single(NULL, data->format, NULL, s, NULL, NULL);
if (data->type == WINDOW_TREE_SESSION)
expanded = 0;
else
expanded = 1;
mti = mode_tree_add(data->data, NULL, item, (uintptr_t)s, s->name, text,
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
expanded);
free(text);
l = NULL;
n = 0;
RB_FOREACH(wl, winlinks, &s->windows) {
l = xreallocarray(l, n + 1, sizeof *l);
l[n++] = wl;
}
2020-11-01 18:16:04 +03:00
window_tree_sort = sort_crit;
qsort(l, n, sizeof *l, window_tree_cmp_window);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
empty = 0;
for (i = 0; i < n; i++) {
2020-11-01 18:16:04 +03:00
if (!window_tree_build_window(s, l[i], modedata, sort_crit, mti,
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
filter))
empty++;
}
if (empty == n) {
window_tree_free_item(item);
data->item_size--;
mode_tree_remove(data->data, mti);
}
free(l);
}
static void
2020-11-01 18:16:04 +03:00
window_tree_build(void *modedata, struct mode_tree_sort_criteria *sort_crit,
uint64_t *tag, const char *filter)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
struct window_tree_modedata *data = modedata;
struct session *s, **l;
2019-01-06 00:44:40 +03:00
struct session_group *sg, *current;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
u_int n, i;
2019-01-06 00:44:40 +03:00
current = session_group_contains(data->fs.s);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
for (i = 0; i < data->item_size; i++)
window_tree_free_item(data->item_list[i]);
free(data->item_list);
data->item_list = NULL;
data->item_size = 0;
l = NULL;
n = 0;
RB_FOREACH(s, sessions, &sessions) {
2019-01-06 00:44:40 +03:00
if (data->squash_groups &&
(sg = session_group_contains(s)) != NULL) {
if ((sg == current && s != data->fs.s) ||
(sg != current && s != TAILQ_FIRST(&sg->sessions)))
continue;
}
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
l = xreallocarray(l, n + 1, sizeof *l);
l[n++] = s;
}
2020-11-01 18:16:04 +03:00
window_tree_sort = sort_crit;
qsort(l, n, sizeof *l, window_tree_cmp_session);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
for (i = 0; i < n; i++)
2020-11-01 18:16:04 +03:00
window_tree_build_session(l[i], modedata, sort_crit, filter);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
free(l);
switch (data->type) {
case WINDOW_TREE_NONE:
break;
case WINDOW_TREE_SESSION:
*tag = (uintptr_t)data->fs.s;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
break;
case WINDOW_TREE_WINDOW:
*tag = (uintptr_t)data->fs.wl;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
break;
case WINDOW_TREE_PANE:
2019-01-06 00:44:40 +03:00
if (window_count_panes(data->fs.wl->window) == 1)
2019-01-06 03:31:35 +03:00
*tag = (uintptr_t)data->fs.wl;
2019-01-06 00:44:40 +03:00
else
2019-01-06 03:31:35 +03:00
*tag = (uintptr_t)data->fs.wp;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
break;
}
}
2019-01-06 00:44:40 +03:00
static void
window_tree_draw_label(struct screen_write_ctx *ctx, u_int px, u_int py,
u_int sx, u_int sy, const struct grid_cell *gc, const char *label)
{
size_t len;
u_int ox, oy;
len = strlen(label);
if (sx == 0 || sy == 1 || len > sx)
return;
ox = (sx - len + 1) / 2;
oy = (sy + 1) / 2;
if (ox > 1 && ox + len < sx - 1 && sy >= 3) {
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, px + ox - 1, py + oy - 1, 0);
2023-06-29 01:21:26 +03:00
screen_write_box(ctx, len + 2, 3, BOX_LINES_DEFAULT, NULL,
NULL);
2019-01-06 00:44:40 +03:00
}
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, px + ox, py + oy, 0);
2019-01-06 00:44:40 +03:00
screen_write_puts(ctx, gc, "%s", label);
}
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
static void
window_tree_draw_session(struct window_tree_modedata *data, struct session *s,
struct screen_write_ctx *ctx, u_int sx, u_int sy)
{
struct options *oo = s->options;
struct winlink *wl;
struct window *w;
2019-01-06 00:44:40 +03:00
u_int cx = ctx->s->cx, cy = ctx->s->cy;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
u_int loop, total, visible, each, width, offset;
u_int current, start, end, remaining, i;
struct grid_cell gc;
int colour, active_colour, left, right;
char *label;
total = winlink_count(&s->windows);
memcpy(&gc, &grid_default_cell, sizeof gc);
colour = options_get_number(oo, "display-panes-colour");
active_colour = options_get_number(oo, "display-panes-active-colour");
if (sx / total < 24) {
visible = sx / 24;
if (visible == 0)
visible = 1;
} else
visible = total;
current = 0;
RB_FOREACH(wl, winlinks, &s->windows) {
if (wl == s->curw)
break;
current++;
}
if (current < visible) {
start = 0;
end = visible;
} else if (current >= total - visible) {
start = total - visible;
end = total;
} else {
start = current - (visible / 2);
end = start + visible;
}
if (data->offset < -(int)start)
data->offset = -(int)start;
if (data->offset > (int)(total - end))
data->offset = (int)(total - end);
start += data->offset;
end += data->offset;
left = (start != 0);
right = (end != total);
if (((left && right) && sx <= 6) || ((left || right) && sx <= 3))
left = right = 0;
if (left && right) {
each = (sx - 6) / visible;
remaining = (sx - 6) - (visible * each);
} else if (left || right) {
each = (sx - 3) / visible;
remaining = (sx - 3) - (visible * each);
} else {
each = sx / visible;
remaining = sx - (visible * each);
}
if (each == 0)
return;
if (left) {
2019-01-06 00:44:40 +03:00
data->left = cx + 2;
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + 2, cy, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_vline(ctx, sy, 0, 0);
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx, cy + sy / 2, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_puts(ctx, &grid_default_cell, "<");
2019-01-06 00:44:40 +03:00
} else
data->left = -1;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
if (right) {
2019-01-06 00:44:40 +03:00
data->right = cx + sx - 3;
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + sx - 3, cy, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_vline(ctx, sy, 0, 0);
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + sx - 1, cy + sy / 2, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_puts(ctx, &grid_default_cell, ">");
2019-01-06 00:44:40 +03:00
} else
data->right = -1;
data->start = start;
data->end = end;
data->each = each;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
i = loop = 0;
RB_FOREACH(wl, winlinks, &s->windows) {
if (loop == end)
break;
if (loop < start) {
loop++;
continue;
}
w = wl->window;
if (wl == s->curw)
gc.fg = active_colour;
else
gc.fg = colour;
if (left)
offset = 3 + (i * each);
else
offset = (i * each);
if (loop == end - 1)
width = each + remaining;
else
width = each - 1;
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + offset, cy, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_preview(ctx, &w->active->base, width, sy);
xasprintf(&label, " %u:%s ", wl->idx, w->name);
if (strlen(label) > width)
xasprintf(&label, " %u ", wl->idx);
2019-01-06 00:44:40 +03:00
window_tree_draw_label(ctx, cx + offset, cy, width, sy, &gc,
label);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
free(label);
if (loop != end - 1) {
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + offset + width, cy, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_vline(ctx, sy, 0, 0);
}
loop++;
i++;
}
}
static void
window_tree_draw_window(struct window_tree_modedata *data, struct session *s,
struct window *w, struct screen_write_ctx *ctx, u_int sx, u_int sy)
{
struct options *oo = s->options;
struct window_pane *wp;
2019-01-06 00:44:40 +03:00
u_int cx = ctx->s->cx, cy = ctx->s->cy;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
u_int loop, total, visible, each, width, offset;
u_int current, start, end, remaining, i;
2019-01-06 00:44:40 +03:00
u_int pane_idx;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
struct grid_cell gc;
int colour, active_colour, left, right;
char *label;
total = window_count_panes(w);
memcpy(&gc, &grid_default_cell, sizeof gc);
colour = options_get_number(oo, "display-panes-colour");
active_colour = options_get_number(oo, "display-panes-active-colour");
if (sx / total < 24) {
visible = sx / 24;
if (visible == 0)
visible = 1;
} else
visible = total;
current = 0;
TAILQ_FOREACH(wp, &w->panes, entry) {
if (wp == w->active)
break;
current++;
}
if (current < visible) {
start = 0;
end = visible;
} else if (current >= total - visible) {
start = total - visible;
end = total;
} else {
start = current - (visible / 2);
end = start + visible;
}
if (data->offset < -(int)start)
data->offset = -(int)start;
if (data->offset > (int)(total - end))
data->offset = (int)(total - end);
start += data->offset;
end += data->offset;
left = (start != 0);
right = (end != total);
if (((left && right) && sx <= 6) || ((left || right) && sx <= 3))
left = right = 0;
if (left && right) {
each = (sx - 6) / visible;
remaining = (sx - 6) - (visible * each);
} else if (left || right) {
each = (sx - 3) / visible;
remaining = (sx - 3) - (visible * each);
} else {
each = sx / visible;
remaining = sx - (visible * each);
}
if (each == 0)
return;
if (left) {
2019-01-06 00:44:40 +03:00
data->left = cx + 2;
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + 2, cy, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_vline(ctx, sy, 0, 0);
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx, cy + sy / 2, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_puts(ctx, &grid_default_cell, "<");
2019-01-06 00:44:40 +03:00
} else
data->left = -1;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
if (right) {
2019-01-06 00:44:40 +03:00
data->right = cx + sx - 3;
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + sx - 3, cy, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_vline(ctx, sy, 0, 0);
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + sx - 1, cy + sy / 2, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_puts(ctx, &grid_default_cell, ">");
2019-01-06 00:44:40 +03:00
} else
data->right = -1;
data->start = start;
data->end = end;
data->each = each;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
i = loop = 0;
TAILQ_FOREACH(wp, &w->panes, entry) {
if (loop == end)
break;
if (loop < start) {
loop++;
continue;
}
if (wp == w->active)
gc.fg = active_colour;
else
gc.fg = colour;
if (left)
offset = 3 + (i * each);
else
offset = (i * each);
if (loop == end - 1)
width = each + remaining;
else
width = each - 1;
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + offset, cy, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_preview(ctx, &wp->base, width, sy);
2019-01-06 00:44:40 +03:00
if (window_pane_index(wp, &pane_idx) != 0)
pane_idx = loop;
xasprintf(&label, " %u ", pane_idx);
window_tree_draw_label(ctx, cx + offset, cy, each, sy, &gc,
label);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
free(label);
if (loop != end - 1) {
2019-11-13 00:02:28 +03:00
screen_write_cursormove(ctx, cx + offset + width, cy, 0);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
screen_write_vline(ctx, sy, 0, 0);
}
loop++;
i++;
}
}
2019-01-06 00:44:40 +03:00
static void
window_tree_draw(void *modedata, void *itemdata, struct screen_write_ctx *ctx,
u_int sx, u_int sy)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
struct window_tree_itemdata *item = itemdata;
struct session *sp;
struct winlink *wlp;
struct window_pane *wp;
window_tree_pull_item(item, &sp, &wlp, &wp);
if (wp == NULL)
2019-01-06 00:44:40 +03:00
return;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
switch (item->type) {
case WINDOW_TREE_NONE:
2019-01-06 00:44:40 +03:00
break;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
case WINDOW_TREE_SESSION:
2019-01-06 00:44:40 +03:00
window_tree_draw_session(modedata, sp, ctx, sx, sy);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
break;
case WINDOW_TREE_WINDOW:
2019-01-06 00:44:40 +03:00
window_tree_draw_window(modedata, sp, wlp->window, ctx, sx, sy);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
break;
case WINDOW_TREE_PANE:
2019-01-06 00:44:40 +03:00
screen_write_preview(ctx, &wp->base, sx, sy);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
break;
}
}
static int
window_tree_search(__unused void *modedata, void *itemdata, const char *ss)
{
struct window_tree_itemdata *item = itemdata;
struct session *s;
struct winlink *wl;
struct window_pane *wp;
2020-01-07 00:03:23 +03:00
char *cmd;
int retval;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
window_tree_pull_item(item, &s, &wl, &wp);
switch (item->type) {
case WINDOW_TREE_NONE:
return (0);
case WINDOW_TREE_SESSION:
if (s == NULL)
return (0);
return (strstr(s->name, ss) != NULL);
case WINDOW_TREE_WINDOW:
if (s == NULL || wl == NULL)
return (0);
return (strstr(wl->window->name, ss) != NULL);
case WINDOW_TREE_PANE:
if (s == NULL || wl == NULL || wp == NULL)
break;
cmd = osdep_get_name(wp->fd, wp->tty);
if (cmd == NULL || *cmd == '\0')
return (0);
2020-01-07 00:03:23 +03:00
retval = (strstr(cmd, ss) != NULL);
free(cmd);
return (retval);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
}
return (0);
}
2020-01-07 00:03:23 +03:00
static void
window_tree_menu(void *modedata, struct client *c, key_code key)
{
struct window_tree_modedata *data = modedata;
struct window_pane *wp = data->wp;
struct window_mode_entry *wme;
wme = TAILQ_FIRST(&wp->modes);
if (wme == NULL || wme->data != modedata)
return;
window_tree_key(wme, c, NULL, NULL, key, NULL);
}
static key_code
window_tree_get_key(void *modedata, void *itemdata, u_int line)
{
struct window_tree_modedata *data = modedata;
struct window_tree_itemdata *item = itemdata;
struct format_tree *ft;
struct session *s;
struct winlink *wl;
struct window_pane *wp;
char *expanded;
key_code key;
ft = format_create(NULL, NULL, FORMAT_NONE, 0);
window_tree_pull_item(item, &s, &wl, &wp);
if (item->type == WINDOW_TREE_SESSION)
format_defaults(ft, NULL, s, NULL, NULL);
else if (item->type == WINDOW_TREE_WINDOW)
format_defaults(ft, NULL, s, wl, NULL);
else
format_defaults(ft, NULL, s, wl, wp);
format_add(ft, "line", "%u", line);
expanded = format_expand(ft, data->key_format);
key = key_string_lookup_string(expanded);
free(expanded);
format_free(ft);
2023-06-29 01:21:26 +03:00
return (key);
}
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
static struct screen *
2019-11-13 00:02:28 +03:00
window_tree_init(struct window_mode_entry *wme, struct cmd_find_state *fs,
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
struct args *args)
{
2019-11-13 00:02:28 +03:00
struct window_pane *wp = wme->wp;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
struct window_tree_modedata *data;
struct screen *s;
2019-11-13 00:02:28 +03:00
wme->data = data = xcalloc(1, sizeof *data);
2020-01-07 00:03:23 +03:00
data->wp = wp;
data->references = 1;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
if (args_has(args, 's'))
data->type = WINDOW_TREE_SESSION;
else if (args_has(args, 'w'))
data->type = WINDOW_TREE_WINDOW;
else
data->type = WINDOW_TREE_PANE;
memcpy(&data->fs, fs, sizeof data->fs);
if (args == NULL || !args_has(args, 'F'))
data->format = xstrdup(WINDOW_TREE_DEFAULT_FORMAT);
else
data->format = xstrdup(args_get(args, 'F'));
if (args == NULL || !args_has(args, 'K'))
data->key_format = xstrdup(WINDOW_TREE_DEFAULT_KEY_FORMAT);
else
data->key_format = xstrdup(args_get(args, 'K'));
2023-06-29 01:21:26 +03:00
if (args == NULL || args_count(args) == 0)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
data->command = xstrdup(WINDOW_TREE_DEFAULT_COMMAND);
else
2023-06-29 01:21:26 +03:00
data->command = xstrdup(args_string(args, 0));
2019-01-06 00:44:40 +03:00
data->squash_groups = !args_has(args, 'G');
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
data->data = mode_tree_start(wp, args, window_tree_build,
window_tree_draw, window_tree_search, window_tree_menu, NULL,
window_tree_get_key, data, window_tree_menu_items,
window_tree_sort_list, nitems(window_tree_sort_list), &s);
2019-01-06 00:44:40 +03:00
mode_tree_zoom(data->data, args);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
mode_tree_build(data->data);
mode_tree_draw(data->data);
data->type = WINDOW_TREE_NONE;
return (s);
}
static void
window_tree_destroy(struct window_tree_modedata *data)
{
u_int i;
if (--data->references != 0)
return;
for (i = 0; i < data->item_size; i++)
window_tree_free_item(data->item_list[i]);
free(data->item_list);
free(data->format);
free(data->key_format);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
free(data->command);
free(data);
}
static void
2019-11-13 00:02:28 +03:00
window_tree_free(struct window_mode_entry *wme)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
2019-11-13 00:02:28 +03:00
struct window_tree_modedata *data = wme->data;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
if (data == NULL)
return;
data->dead = 1;
2019-01-06 00:44:40 +03:00
mode_tree_free(data->data);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
window_tree_destroy(data);
}
static void
2019-11-13 00:02:28 +03:00
window_tree_resize(struct window_mode_entry *wme, u_int sx, u_int sy)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
2019-11-13 00:02:28 +03:00
struct window_tree_modedata *data = wme->data;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
mode_tree_resize(data->data, sx, sy);
}
static void
window_tree_update(struct window_mode_entry *wme)
{
struct window_tree_modedata *data = wme->data;
mode_tree_build(data->data);
mode_tree_draw(data->data);
data->wp->flags |= PANE_REDRAW;
}
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
static char *
window_tree_get_target(struct window_tree_itemdata *item,
struct cmd_find_state *fs)
{
struct session *s;
struct winlink *wl;
struct window_pane *wp;
char *target;
window_tree_pull_item(item, &s, &wl, &wp);
target = NULL;
switch (item->type) {
case WINDOW_TREE_NONE:
break;
case WINDOW_TREE_SESSION:
if (s == NULL)
break;
xasprintf(&target, "=%s:", s->name);
break;
case WINDOW_TREE_WINDOW:
if (s == NULL || wl == NULL)
break;
xasprintf(&target, "=%s:%u.", s->name, wl->idx);
break;
case WINDOW_TREE_PANE:
if (s == NULL || wl == NULL || wp == NULL)
break;
xasprintf(&target, "=%s:%u.%%%u", s->name, wl->idx, wp->id);
break;
}
if (target == NULL)
cmd_find_clear_state(fs, 0);
else
cmd_find_from_winlink_pane(fs, wl, wp, 0);
return (target);
}
static void
2020-11-01 18:16:04 +03:00
window_tree_command_each(void *modedata, void *itemdata, struct client *c,
2019-01-06 00:44:40 +03:00
__unused key_code key)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
struct window_tree_modedata *data = modedata;
struct window_tree_itemdata *item = itemdata;
char *name;
struct cmd_find_state fs;
name = window_tree_get_target(item, &fs);
if (name != NULL)
2019-01-06 00:44:40 +03:00
mode_tree_run_command(c, &fs, data->entered, name);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
free(name);
}
static enum cmd_retval
window_tree_command_done(__unused struct cmdq_item *item, void *modedata)
{
struct window_tree_modedata *data = modedata;
if (!data->dead) {
mode_tree_build(data->data);
mode_tree_draw(data->data);
data->wp->flags |= PANE_REDRAW;
}
window_tree_destroy(data);
return (CMD_RETURN_NORMAL);
}
static int
window_tree_command_callback(struct client *c, void *modedata, const char *s,
__unused int done)
{
struct window_tree_modedata *data = modedata;
2019-01-06 00:44:40 +03:00
if (s == NULL || *s == '\0' || data->dead)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
return (0);
data->entered = s;
2019-01-06 00:44:40 +03:00
mode_tree_each_tagged(data->data, window_tree_command_each, c,
KEYC_NONE, 1);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
data->entered = NULL;
data->references++;
cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
return (0);
}
static void
window_tree_command_free(void *modedata)
{
struct window_tree_modedata *data = modedata;
window_tree_destroy(data);
}
2019-01-06 00:44:40 +03:00
static void
2020-11-01 18:16:04 +03:00
window_tree_kill_each(__unused void *modedata, void *itemdata,
2019-01-06 00:44:40 +03:00
__unused struct client *c, __unused key_code key)
{
struct window_tree_itemdata *item = itemdata;
struct session *s;
struct winlink *wl;
struct window_pane *wp;
window_tree_pull_item(item, &s, &wl, &wp);
switch (item->type) {
case WINDOW_TREE_NONE:
break;
case WINDOW_TREE_SESSION:
if (s != NULL) {
server_destroy_session(s);
2020-01-07 00:03:23 +03:00
session_destroy(s, 1, __func__);
2019-01-06 00:44:40 +03:00
}
break;
case WINDOW_TREE_WINDOW:
if (wl != NULL)
server_kill_window(wl->window, 0);
2019-01-06 00:44:40 +03:00
break;
case WINDOW_TREE_PANE:
if (wp != NULL)
server_kill_pane(wp);
break;
}
}
static int
window_tree_kill_current_callback(struct client *c, void *modedata,
const char *s, __unused int done)
{
struct window_tree_modedata *data = modedata;
struct mode_tree_data *mtd = data->data;
if (s == NULL || *s == '\0' || data->dead)
return (0);
if (tolower((u_char) s[0]) != 'y' || s[1] != '\0')
return (0);
window_tree_kill_each(data, mode_tree_get_current(mtd), c, KEYC_NONE);
server_renumber_all();
2019-01-06 00:44:40 +03:00
data->references++;
cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
return (0);
}
static int
window_tree_kill_tagged_callback(struct client *c, void *modedata,
const char *s, __unused int done)
{
struct window_tree_modedata *data = modedata;
struct mode_tree_data *mtd = data->data;
if (s == NULL || *s == '\0' || data->dead)
return (0);
if (tolower((u_char) s[0]) != 'y' || s[1] != '\0')
return (0);
mode_tree_each_tagged(mtd, window_tree_kill_each, c, KEYC_NONE, 1);
server_renumber_all();
2019-01-06 00:44:40 +03:00
data->references++;
cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
return (0);
}
static key_code
window_tree_mouse(struct window_tree_modedata *data, key_code key, u_int x,
struct window_tree_itemdata *item)
{
struct session *s;
struct winlink *wl;
struct window_pane *wp;
u_int loop;
if (key != KEYC_MOUSEDOWN1_PANE)
return (KEYC_NONE);
if (data->left != -1 && x <= (u_int)data->left)
return ('<');
if (data->right != -1 && x >= (u_int)data->right)
return ('>');
if (data->left != -1)
x -= data->left;
else if (x != 0)
x--;
if (x == 0 || data->end == 0)
x = 0;
else {
x = x / data->each;
if (data->start + x >= data->end)
x = data->end - 1;
}
window_tree_pull_item(item, &s, &wl, &wp);
if (item->type == WINDOW_TREE_SESSION) {
if (s == NULL)
return (KEYC_NONE);
mode_tree_expand_current(data->data);
loop = 0;
RB_FOREACH(wl, winlinks, &s->windows) {
if (loop == data->start + x)
break;
loop++;
}
if (wl != NULL)
2019-01-06 03:31:35 +03:00
mode_tree_set_current(data->data, (uintptr_t)wl);
2019-01-06 00:44:40 +03:00
return ('\r');
}
if (item->type == WINDOW_TREE_WINDOW) {
if (wl == NULL)
return (KEYC_NONE);
mode_tree_expand_current(data->data);
loop = 0;
TAILQ_FOREACH(wp, &wl->window->panes, entry) {
if (loop == data->start + x)
break;
loop++;
}
if (wp != NULL)
2019-01-06 03:31:35 +03:00
mode_tree_set_current(data->data, (uintptr_t)wp);
2019-01-06 00:44:40 +03:00
return ('\r');
}
return (KEYC_NONE);
}
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
static void
2019-11-13 00:02:28 +03:00
window_tree_key(struct window_mode_entry *wme, struct client *c,
__unused struct session *s, __unused struct winlink *wl, key_code key,
struct mouse_event *m)
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
{
2019-11-13 00:02:28 +03:00
struct window_pane *wp = wme->wp;
struct window_tree_modedata *data = wme->data;
2019-01-06 00:44:40 +03:00
struct window_tree_itemdata *item, *new_item;
char *name, *prompt = NULL;
struct cmd_find_state fs, *fsp = &data->fs;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
int finished;
2019-01-06 00:44:40 +03:00
u_int tagged, x, y, idx;
struct session *ns;
struct winlink *nwl;
struct window_pane *nwp;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
item = mode_tree_get_current(data->data);
2019-01-06 00:44:40 +03:00
finished = mode_tree_key(data->data, c, &key, m, &x, &y);
if (item != (new_item = mode_tree_get_current(data->data))) {
item = new_item;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
data->offset = 0;
2019-01-06 00:44:40 +03:00
}
2020-01-07 00:03:23 +03:00
if (KEYC_IS_MOUSE(key) && m != NULL)
2019-01-06 00:44:40 +03:00
key = window_tree_mouse(data, key, x, item);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
switch (key) {
case '<':
data->offset--;
break;
case '>':
data->offset++;
break;
case 'H':
mode_tree_expand(data->data, (uintptr_t)fsp->s);
mode_tree_expand(data->data, (uintptr_t)fsp->wl);
if (!mode_tree_set_current(data->data, (uintptr_t)wme->wp))
mode_tree_set_current(data->data, (uintptr_t)fsp->wl);
break;
case 'm':
window_tree_pull_item(item, &ns, &nwl, &nwp);
server_set_marked(ns, nwl, nwp);
mode_tree_build(data->data);
break;
case 'M':
server_clear_marked();
mode_tree_build(data->data);
break;
2019-01-06 00:44:40 +03:00
case 'x':
window_tree_pull_item(item, &ns, &nwl, &nwp);
switch (item->type) {
case WINDOW_TREE_NONE:
break;
case WINDOW_TREE_SESSION:
if (ns == NULL)
break;
xasprintf(&prompt, "Kill session %s? ", ns->name);
break;
case WINDOW_TREE_WINDOW:
if (nwl == NULL)
break;
xasprintf(&prompt, "Kill window %u? ", nwl->idx);
break;
case WINDOW_TREE_PANE:
if (nwp == NULL || window_pane_index(nwp, &idx) != 0)
break;
xasprintf(&prompt, "Kill pane %u? ", idx);
break;
}
if (prompt == NULL)
break;
data->references++;
status_prompt_set(c, NULL, prompt, "",
2019-01-06 00:44:40 +03:00
window_tree_kill_current_callback, window_tree_command_free,
2023-06-29 01:21:26 +03:00
data, PROMPT_SINGLE|PROMPT_NOFORMAT, PROMPT_TYPE_COMMAND);
2019-01-06 00:44:40 +03:00
free(prompt);
break;
case 'X':
tagged = mode_tree_count_tagged(data->data);
if (tagged == 0)
break;
xasprintf(&prompt, "Kill %u tagged? ", tagged);
data->references++;
status_prompt_set(c, NULL, prompt, "",
2019-01-06 00:44:40 +03:00
window_tree_kill_tagged_callback, window_tree_command_free,
2023-06-29 01:21:26 +03:00
data, PROMPT_SINGLE|PROMPT_NOFORMAT, PROMPT_TYPE_COMMAND);
2019-01-06 00:44:40 +03:00
free(prompt);
break;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
case ':':
tagged = mode_tree_count_tagged(data->data);
if (tagged != 0)
xasprintf(&prompt, "(%u tagged) ", tagged);
else
xasprintf(&prompt, "(current) ");
data->references++;
status_prompt_set(c, NULL, prompt, "",
window_tree_command_callback, window_tree_command_free,
2023-06-29 01:21:26 +03:00
data, PROMPT_NOFORMAT, PROMPT_TYPE_COMMAND);
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
free(prompt);
break;
case '\r':
name = window_tree_get_target(item, &fs);
if (name != NULL)
2019-01-06 00:44:40 +03:00
mode_tree_run_command(c, NULL, data->command, name);
finished = 1;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
free(name);
2019-01-06 00:44:40 +03:00
break;
CHANGES FROM 2.5 TO 2.6, 05 October 2017 * Add select-pane -T to set pane title. * Fix memory leak when lines with BCE are removed from history. * Fix (again) the "prefer unattached" behaviour of attach-session. * Reorder how keys are checked to allow keys to be specified that have a leading escape. GitHub issue 1048. * Support REP escape sequence (\033[b). * Run alert hooks based on options rather than always, and allow further bells even if there is an existing bell. * Add -d flag to display-panes to override display-panes-time. * Add selection_present format when in copy mode (allows key bindings that do something different if there is a selection). * Add pane_at_left, pane_at_right, pane_at_top and pane_at_bottom formats. * Make bell, activity and silence alerting more consistent by: removing the bell-on-alert option; adding activity-action and silence-action options with the same possible values as the existing bell-action; adding a "both" value for the visual-bell, visual-activity and visual-silence options to trigger both a bell and a message. * Add a pane_pipe format to show if pipe-pane is active. * Block signals between forking and resetting signal handlers so that the libevent signal handler doesn't get called in the child and incorrectly write into the signal pipe that it still shares with the parent. GitHub issue 1001. * Allow punctuation in pane_current_command. * Add -c for respawn-pane and respawn-window. * Wait for any remaining data to flush when a pane is closed while pipe-pane is in use. * Fix working out current client with no target. GitHub issue 995. * Try to fallback to C.UTF-8 as well as en_US.UTF-8 when looking for a UTF-8 locale. * Add user-keys option for user-defined key escape sequences (mapped to User0 to User999 keys). * Add pane-set-clipboard hook. * FAQ file has moved out of repository to online. * Fix problem with high CPU usage when a client dies unexpectedly. GitHub issue 941. * Do a dance on OS X 10.10 and above to return tmux to the user namespace, allowing access to the clipboard. * Do not allow escape sequences which expect a specific terminator (APC, DSC, OSC) to wait for forever - use a small timeout. This reduces the chance of the pane locking up completely when sent garbage (cat /dev/random or similar). * Support SIGUSR2 to toggle logging on a running server, also generate the "out" log file with -vv not -vvvv. * Make set-clipboard a three state option: on (tmux both sends to outside terminal and accepts from applications inside); external (tmux sends outside but does not accept inside); and off. * Fix OSC 4 palette setting for bright foreground colours. GitHub issue 954. * Use setrgbf and setrgbb terminfo(5) capabilities to set RGB colours, if they are available. (Tc is still supported as well.) * Fix redrawing panes when they are resized several times but end up with the size unchanged (for example, splitw/resizep -Z/breakp). * Major rewrite of choose mode. Now includes preview, sorting, searching and tagging; commands that can be executed directly from the mode (for example, to delete one or more buffers); and filtering in tree mode. * choose-window and choose-session are now aliases of choose-tree (in the command-alias option). * Support OSC 10 and OSC 11 to set foreground and background colours. * Check the U8 capability to determine whether to use UTF-8 line drawing characters for ACS. * Some missing notifications for layout changes. * Control mode clients now do not affect session sizes until they issue refresh-client -C. new-session -x and -y works with control clients even if the session is not detached. * All new sessions that are unattached (whether with -d or started with no terminal) are now created with size 80 x 24. Whether the status line is on or off does not affect the size of new sessions until they are attached. * Expand formats in option names and add -F flag to expand them in option values. * Remember the search string for a pane even if copy mode is exited and entered again. * Some further BCE fixes (scroll up, reverse index). * Improvements to how terminals are cleared (entirely or partially). CHANGES FROM 2.4 TO 2.5, 09 May 2017 * Reset updated flag when restarting #() command so that new output is properly recognised. GitHub issue 922. * Fix ECH with a background colour. * Do not rely on the terminal not moving the cursor after DL or EL. * Fix send-keys and send-prefix in copy-mode (so C-b C-b works). GitHub issue 905. * Set the current pane for rotate-window so it works in command sequences. * Add pane_mode format. * Differentiate M-Up from Escape+Up when possible (that is, in terminals with xterm(1) style function keys). GitHub issue 907. * Add session_stack and window_stack_index formats. * Some new control mode notifications and corresponding hooks: pane-mode-changed, window-pane-changed, client-session-changed, session-window-changed. * Format pane_search_string for last search term while in copy mode (useful with command-prompt -I). * Fix a problem with high CPU usage and multiple clients with #(). GitHub issue 889. * Fix UTF-8 combining characters in column 0. * Fix reference counting so that panes are properly destroyed and their processes killed. * Clamp SU (CSI S) parameter to work around a bug in Konsole. * Tweak line wrapping in full width panes to play more nicely with terminal copy and paste. * Fix when we emit SGR 0 in capture-pane -e. * Do not change TERM until after config file parsing has finished, so that commands run inside the config file can use it to make decisions (typically about default-terminal). * Make the initial client wait until config file parsing has finished to avoid racing with commands. * Fix core when if-shell fails. * Only use ED to clear screen if the pane is at the bottom. * Fix multibyte UTF-8 output. * Code improvements around target (-t) resolution. * Change how the default target (for commands without -t) is managed across command sequences: now it is set up at the start and commands are required to update it if needed. Fixes binding command sequences to mouse keys. * Make if-shell from the config file work correctly. * Change to always check the root key table if no binding is found in the current table (prefix table or copy-mode table or whatever). This means that root key bindings will take effect even in copy mode, if not overridden by a copy mode key binding. * Fix so that the history file works again. * Run config file without a client rather than using the first client, restores previous behaviour. * If a #() command doesn't exit, continue to read from it and use its last full line of output. * Handle slow terminals and fast output better: when the amount of data outstanding gets too large, discard output until it is drained and we are able to do a full redraw. Prevents tmux sitting on a huge buffer that the terminal will take forever to consume. * Do not redraw a client unless we realistically think it can accept the data - defer redraws until the client has nothing else waiting to write.
2017-10-13 00:59:47 +03:00
}
if (finished)
window_pane_reset_mode(wp);
else {
mode_tree_draw(data->data);
wp->flags |= PANE_REDRAW;
}
}