summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server-client.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Move status line free into its own function.nicm2019-03-151-8/+2
|
* Store the time in the format tree rather than passing it around.nicm2019-03-141-2/+2
|
* Accept 0 time as a shorthand for now to format_expand_time.nicm2019-03-141-2/+2
|
* Allow multiple modes to be open in a pane. A stack of open modes is keptnicm2019-03-121-18/+16
| | | | | | and the previous restored when the top is exited. If a mode that is already on the stack is entered, the existing instance is moved to the top as the active mode rather than being opened new.
* Add a separate mode struct for the active window mode if any.nicm2019-03-071-3/+6
|
* Use starting client cwd in config file, GitHub issue 1606.nicm2019-02-161-1/+3
|
* Pass window into mode functions.nicm2018-12-181-3/+5
|
* evbuffer_new and bufferevent_new can both fail (when malloc fails) andnicm2018-11-191-1/+7
| | | | return NULL. GitHub issue 1547.
* If a non-repeating key is used when repeating, it should be treated asnicm2018-11-071-4/+9
| | | | | an entirely new key press, not checked in root table and ignored if not found. GitHub issue 1513.
* Support for windows larger than visible on the attached client. This hasnicm2018-10-181-26/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | been a limitation for a long time. There are two new options, window-size and default-size, and a new command, resize-window. The force-width and force-height options and the session_width and session_height formats have been removed. The new window-size option tells tmux how to work out the size of windows: largest means it picks the size of the largest session, smallest the smallest session (similar to the old behaviour) and manual means that it does not automatically resize windows. The default is currently largest but this may change. aggressive-resize modifies the choice of session for largest and smallest as it did before. If a window is in a session attached to a client that is too small, only part of the window is shown. tmux attempts to keep the cursor visible, so the part of the window displayed is changed as the cursor moves (with a small delay, to try and avoid excess redrawing when applications redraw status lines or similar that are not currently visible). The offset of the visible portion of the window is shown in status-right. Drawing windows which are larger than the client is not as efficient as those which fit, particularly when the cursor moves, so it is recommended to avoid using this on slow machines or networks (set window-size to smallest or manual). The resize-window command can be used to resize a window manually. If it is used, the window-size option is automatically set to manual for the window (undo this with "setw -u window-size"). resize-window works in a similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and -A flags. -a sets the window to the size of the smallest client (what it would be if window-size was smallest) and -A the largest. For the same behaviour as force-width or force-height, use resize-window -x or -y, and "setw -u window-size" to revert to automatic sizing.. If the global window-size option is set to manual, the default-size option is used for new windows. If -x or -y is used with new-session, that sets the default-size option for the new session. The maximum size of a window is 10000x10000. But expect applications to complain and much higher memory use if making a window excessively big. The minimum size is the size required for the current layout including borders. The refresh-client command can be used to pan around a window, -U -D -L -R moves up, down, left or right and -c returns to automatic cursor tracking. The position is reset when the current window is changed.
* Do not check for mouse events on pane borders when zoomed, based on anicm2018-09-111-16/+23
| | | | fix from Avi Halachmi.
* Keep any text killed in the command prompt with C-w and yank it withnicm2018-08-291-1/+2
| | | | | C-y, only use the top buffer if no text has previously been killed. This and previous change promped by discussion with kn@.
* Add StatusLeft and StatusRight mouse key modifiers for the left andnicm2018-08-221-10/+92
| | | | right parts of the status line.
* Add a flag to force redrawing of the status line even if the contentnicm2018-08-191-1/+7
| | | | hasn't changed, needed for resizing.
* Add a client redraw-window flag instead of the redraw-all flag and fornicm2018-08-191-26/+15
| | | | all just use the three flags together (window, borders, status).
* SESSION_UNATTACHED flag is no longer necessary now we have an attachednicm2018-08-181-2/+2
| | | | count instead.
* Make key trees and some other bits static.nicm2018-08-021-5/+6
|
* When a key isn't in the first table, we need to try the same key againnicm2018-07-171-11/+16
| | | | | not the any key. Also rename some labels. Fixes GitHub issue 1406 reeported by Mark Kelly.
* Add an "Any" key to run a command if a key is pressed that is not boundnicm2018-07-161-2/+6
| | | | in the current key table. GitHub issue 1404.
* Add pane focus hooks.nicm2018-07-041-9/+11
|
* Make server_client_get_cwd used (almost) everywhere we need to work outnicm2018-05-241-5/+9
| | | | | the cwd, and do not fall back to "." as it is pretty useless. GitHub issue 1331.
* Add a missing client-detached hook when the server shuts down, and donicm2018-03-081-1/+3
| | | | | not exit until jobs started from run-shell/if-shell have finished (add a job flags member and a flag to indicate other jobs). GitHub issue 1245.
* Check prefix when retrying so it is checked while repeat flag isnicm2018-02-221-2/+2
| | | | set. GitHub issue 1239.
* Add struct status_line to hold status line members of struct client, notnicm2018-02-051-8/+8
| | | | used yet but will be soon. From Thomas Adam.
* Report better error from server when socket create fails, GitHub issuenicm2017-12-191-2/+6
| | | | 1201.
* Infrastructure for drawing status lines of more than one line in height,nicm2017-10-161-8/+9
| | | | still only one is allowed but this lets tmux draw bigger ones.
* Do not attempt to use TIOCSWINSZ on a -1 file descriptor (possible ifnicm2017-09-061-3/+3
| | | | the pane has already died).
* Pass flags into cmd_find_from_* to fix prefer-unattached, reported bynicm2017-08-301-3/+3
| | | | Thomas Sattler.
* Add -d flag to display-panes to specify timeout, and make 0 mean nonicm2017-08-161-5/+4
| | | | timeout. From Laurens Post.
* Fix redraw defer code in the presence of multiple clients - the timernicm2017-07-141-19/+14
| | | | | | | may be needed for all of them, so don't delete it on the first; and don't skip setting the redraw flag if the timer is already running. Reported by Pol Van Aubel in GitHub issue 1003.
* proc_send_s now seems unnecessary.nicm2017-07-121-3/+3
|
* Remove xterm flag from key before checking prefix, reported by Peternicm2017-06-131-4/+6
| | | | Fern in GitHub issue 974.
* Continue and pass keys through if they are repeated keys, so that thenicm2017-06-061-3/+4
| | | | first key after a repeated key doesn't get lost.
* Some applications like vi(1) and tmux until 10 minutes or so ago, do notnicm2017-05-311-20/+41
| | | | | | | redraw on SIGWINCH if the size returns to the original size between the original SIGWINCH and when they get around to calling TIOCGWINSZ. So use the existing resize timer to introduce a small delay between the two resizes.
* It is not OK to ignore SIGWINCH if SIOCGWINSZ reports the size hasnicm2017-05-311-5/+4
| | | | | | unchanged, because it may have changed and changed back in the time between us getting the signal and calling ioctl(). Always redraw when we see SIGWINCH.
* Because we defer actually resizing applications (calling TIOCSWINSZ)nicm2017-05-311-2/+25
| | | | | | | | | | | | | | | | | until the end of the server loop, tmux may have gone through several internal resizes in between. This can be a problem if the final size is the same as the initial size (what the application things it currently is), because the application may choose not to redraw, assuming the screen state is unchanged, when in fact tmux has thrown away parts of the screen, assuming the application will redraw them. To avoid this, do an extra resize if the new size is the same size as the initial size. This should force the application to redraw when tmux needs it to, while retaining the benefits of deferring (so we now resize at most two times instead of at most one - and only two very rarely). Fixes a problem with break-pane and zoomed panes reported by Michal Mazurek.
* Store a copy of the old status line, will be needed soon for new choose mode.nicm2017-05-291-1/+5
|
* Function to count clients.nicm2017-05-291-1/+16
|
* Line length and spaces to tabs.nicm2017-05-161-8/+9
|
* Insert copy mode bindings at the right place in the command queue.nicm2017-05-101-2/+2
|
* If the current screen was complex enough, it was possible to make redrawnicm2017-05-091-1/+11
| | | | | | itself hit the "terminal can't keep up" check. To avoid this, record how much data we send during redraw (we know we will be starting with 0) and skip the check until it has been flushed. GitHub issue 912.
* Up to now, tmux sees \033\033[OA as M-Up and since we turned onnicm2017-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | xterm-keys by default, generates \033[1;3A instead of \033\033[OA. Unfortunately this confuses vi, which doesn't understand xterm keys and now sees Escape+Up pressed within escape-time as Escape followed by A. The issue doesn't happen in xterm itself because it gets the keys from X and can distinguish between a genuine M-Up and Escape+Up. Because xterm can, tmux can too: xterm will give us \033[1;3A (that is, kUP3) for a real M-Up and \033\033OA for Escape+Up - in fact, we can be sure any \033 preceding an xterm key is a real Escape key press because Meta would be part of the xterm key instead of a separate \033. So change tmux to recognise both sequences as M-Up for its own purposes, but generate the xterm version of M-Up only if it originally received the xterm version from the terminal. This means we will return to sending \033\033OA instead of the xterm key for terminals that do not support xterm keys themselves, but there is no practical way around this because they do not allow us to distinguish between Escape+Up and M-Up. xterm style escape sequences are now the de facto standard for these keys in any case. Problem reported by jsing@ and subsequently by Cecile Tonglet in GitHub issue 907.
* In order that people can use formats like #D in #() in the status linenicm2017-05-011-2/+3
| | | | | | | | | | | | | | and not have to wait for an update when they change pane, we allow commands to run more than once a second if the expanded form changes. Unfortunately this can mean them being run far too often (pretty much continually) when multiple clients exist, because some formats (including #D) will always differ between clients. To avoid this, give each client its own tree of jobs which means that the same command will be different instances for each client - similar to how we have the tag to separate commands for different panes. GitHub issue 889; test case reported by Paul Johnson.
* Mouse bindings and hooks set up an initial current state when running anicm2017-04-221-12/+6
| | | | | | | | | | | | | | | command. This is used for the session, window and pane for all commands in the command sequence if there is no -t or -s. However, using it for all commands in the command sequence means that if the active pane or current session is changed, subsequent commands still use the previous state. So make commands which explicitly change the current state (such as neww and selectp) update it themselves for later commands. Commands which may invalidate the state (like killp) are already OK because an invalid state will be ignored. Also fill in the current state for all key bindings rather than just the mouse, so that any omissions are easier to spot.
* Log error properly when no current state, and some other minor tweaks.nicm2017-04-211-4/+1
|
* Key needs to be initialized to zero now it has flags in it.nicm2017-04-211-1/+3
|
* Add cmd_find_from_winlink_pane and use it in a couple of places, andnicm2017-04-211-6/+2
| | | | make functions that can't fail void.
* It is annoying that the copy mode key table (or any other key table)nicm2017-04-211-24/+33
| | | | | | | | | | | | will suppress root key table bindings. So change to always check the root table if no binding is found in the current table (whether it be the prefix table from pressing the prefix or the copy mode table from a pane). A root key binding can be blocked by binding the key to a command that does nothing (like send-keys with no arguments). Problem reported by Thomas Sattler.
* Store state shared between multiple commands in the queue in a sharednicm2017-04-211-3/+4
| | | | structure.
* Only set up a current target for mouse key bindings. Fixes:nicm2017-04-201-7/+6
| | | | | | | bind q select-pane -U \; resize-pane -Z (There is still some possible weirdness with the way we do current targets, it should probably be done in a different way at some point.)