summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tmux.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* If the current screen was complex enough, it was possible to make redrawnicm2017-05-091-1/+2
| | | | | | 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.
* Add a format for the name of the pane's mode, lets it be used as anicm2017-05-071-10/+13
| | | | conditional for key bindings.
* Up to now, tmux sees \033\033[OA as M-Up and since we turned onnicm2017-05-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Some new notifications, mainly for active pane and current window andnicm2017-05-041-1/+4
| | | | | | | | | | | session: pane-mode-changed window-pane-changed client-session-changed session-window-changed From Joshua Brot.
* Add a format for the last search string in copy mode and fix the promptnicm2017-05-031-1/+2
| | | | so it can work when in -I, suggested by Suraj N Kurapati.
* In order that people can use formats like #D in #() in the status linenicm2017-05-011-2/+6
| | | | | | | | | | | | | | 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.
* Log what is happening with window and session reference counts much morenicm2017-04-281-3/+5
| | | | obviously.
* Make full width panes try to play more nicely with terminal copy andnicm2017-04-251-1/+2
| | | | | paste by avoiding explicit line wraps if we think the terminal will wrap anyway.
* When we write out the grid including escape sequences, an SGR 0 needs tonicm2017-04-251-2/+1
| | | | | cause the colours to be written again. Also treat colours separately from attributes so that RGB colours will work.
* Do not update TERM into config file parsing has finished.nicm2017-04-251-2/+2
|
* Get rid of the extra layer of flags and cmd_prepare() and just store thenicm2017-04-221-39/+15
| | | | | | CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
* Make the cmd_find_* functions more obvious when looking for a client,nicm2017-04-211-11/+10
| | | | | rather than having it inside other functions. Should be no change to the way targets are resolved just yet.
* Style nits and an unused struct.nicm2017-04-211-2/+1
|
* Add cmd_find_from_winlink_pane and use it in a couple of places, andnicm2017-04-211-3/+5
| | | | make functions that can't fail void.
* It is annoying that the copy mode key table (or any other key table)nicm2017-04-211-2/+1
| | | | | | | | | | | | 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.
* More unnecessary arguments now winlink points back to session.nicm2017-04-211-3/+3
|
* Store state shared between multiple commands in the queue in a sharednicm2017-04-211-8/+19
| | | | structure.
* Use fdforkpty() instead of our own unwrapped versions.nicm2017-04-201-5/+1
|
* Now that struct winlink has a session pointer, can remove some arguments.nicm2017-04-201-2/+2
|
* There is no real need for window_printable_flags to allocate, make itnicm2017-04-201-2/+2
| | | | return a buffer from the stack.
* If a #() command doesn't exit, use its most recent line of output (itnicm2017-04-201-14/+19
| | | | | | | must be a full line). Don't let it redraw the status line more than once a second. Requested by someone about 10 years ago...
* Add a suspend helper function, and do not allow detaching or suspendingnicm2017-04-191-2/+3
| | | | while already doing so.
* When the data we have buffered to write to a terminal grows beyond anicm2017-04-191-2/+7
| | | | | | | | | | | | | | | | | | reasonable amount (currently width * height * 8 bytes), discard all output to the terminal and start trying to redraw periodically instead. Continue with this until the amount of data we are trying to write falls to a low level again. This helps to prevent tmux sitting on a huge buffer of data when there are processes with fast output running inside tmux but the outside terminal is slow. A new client_discarded format holds the amount of data that has been discarded due to this mechanism. The three variables (when to start this, when to stop, and how often to redraw) are basically "works for me" at the moment, this is going in to see how it goes and if it causes problems for anyone else.
* Revert use of DECSLRM on iTerm2, it doesn't help as much as we throught,nicm2017-04-181-4/+2
| | | | and there are some question marks about it's support.
* Detect iTerm2 and use DECSLRM for it as well.nicm2017-04-181-2/+4
|
* Add a format for number of bytes writtent to client, useful for debugging.nicm2017-04-181-1/+2
|
* Remove a couple of redraw flags that no longer have any effect.nicm2017-04-171-3/+3
|
* Give each client a name. This defaults to the tty name as before butnicm2017-04-051-2/+2
| | | | | | | falls back to an alternative if the tty name is not available. This is clearer than overloading the client ttyname member and allows us to remove the path stored in the tty struct, it should always be the same as the client.
* Add support for the strikethrough attribute (SGR 9), using the new smxxnicm2017-03-221-4/+6
| | | | | terminfo capability. This means there are now nine attribute bits, so anything above 0xff uses an extended cell.
* Move the client identify (display-panes) code into server-client.c.nicm2017-03-091-3/+3
|
* Move server_fill_environ into environ.c and move some other common codenicm2017-03-091-2/+2
| | | | into it.
* Add a helper function for the most common format_create/defaults/expandnicm2017-03-081-1/+4
| | | | pattern.
* If splitw -b is used, insert the new pane before the current one in thenicm2017-02-271-2/+2
| | | | | | pane list. This means the numbering is in order (for example for display-panes) and fixes a problem with redrawing the active pane borders.
* Don't need is1,is2,is3 so remove them.nicm2017-02-211-4/+1
|
* Make source-file look for files relative to the client working directorynicm2017-02-141-1/+3
| | | | | (like load-buffer and save-buffer), from Chris Pickel. Also break the where-is-this-file code out into its own function for loadb and saveb.
* Don't use a bufferevent for the tty, so we can keep better track of whatnicm2017-02-101-2/+5
| | | | | | is being written and when. Also a manpage typo fix from jmc@.
* Instead of numbering session groups, give them a name which may be givennicm2017-02-091-10/+14
| | | | | to -t instead of a target session. Also allow them to contain only one session.
* Break the message storage function into its own function, useful fornicm2017-02-091-1/+3
| | | | debugging.
* Another helper function to write to terminal and log.nicm2017-02-081-3/+3
|
* Add a common function to invalidate all the terminal cached state.nicm2017-02-081-1/+2
|
* Add support for scroll up escape sequence (CSI S) and use it whennicm2017-02-081-1/+5
| | | | possible instead of sending individual line feeds.
* Collect sequences of printable ASCII characters and process themnicm2017-02-081-6/+15
| | | | | | | | | | | | | | | together instead of handling them one by one. This is significantly faster. Sequences are terminated when we reach the end of the line, fill the internal buffer, or a different character is seen by the input parser (an escape sequence, or UTF-8). Rather than writing collected sequences out immediately, hold them until it is necessary (another screen modification, or we consume all available data). This means we can discard changes that would have no effect (for example, lines that would just be scrolled off the screen or cleared). This reduces the total amount of data we write out to the terminal - not important for fast terminals, but a big help with slow (like xterm).
* Trying to avoid the occasional newline by saving the last cell on screennicm2017-02-081-4/+1
| | | | | is not actually helping us much and just adds complexity, so don't bother.
* Remove event watermarks, don't work well enough to be worth it.nicm2017-02-081-17/+4
|
* Use DECFRA on VT420 compatible terminals (so, xterm) and ED on allnicm2017-02-061-1/+2
| | | | others for clearing panes.
* Do not go through the whole attributes setting process if the new cellnicm2017-02-061-1/+4
| | | | is the same as the previous one.
* Add BCE for clear to start of screen, which was somehow missed.nicm2017-02-061-2/+2
|
* Cancel key table when switching session, unless the key is going tonicm2017-02-061-1/+2
| | | | repeat. Reported by Amos Bird.
* Only redraw the modified character when adding combining characters, notnicm2017-02-061-2/+1
| | | | the whole line.
* Cache status line position to reduce option lookups during output.nicm2017-02-031-2/+4
|