aboutsummaryrefslogtreecommitdiff
path: root/tty.c
Commit message (Collapse)AuthorAge
...
* Need to redraw out to cellsize (total cells used in a line) rather thannicm2017-05-11
| | | | | cellused (only non-space cells) because there may be cells with a nondefault background.
* Move to the right cursor position before using spaces to clear.nicm2017-05-10
|
* We can use ECH to clear sections of lines, so use it for internal panesnicm2017-05-10
| | | | | (that don't touch an edge). Move all the tty clear code into two common functions rather than having the same bunch of checks everywhere.
* If the current screen was complex enough, it was possible to make redrawnicm2017-05-09
| | | | | | 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.
* Konsole incorrectly ignores SU (CSI S) if the parameter is bigger thannicm2017-04-28
| | | | the scroll region, so clamp it. Reported by Moritz Bunkus.
* Make full width panes try to play more nicely with terminal copy andnicm2017-04-25
| | | | | paste by avoiding explicit line wraps if we think the terminal will wrap anyway.
* Only use ED for clear screen if at the bottom, same as earlier fix tonicm2017-04-23
| | | | clear end of screen.
* When the data we have buffered to write to a terminal grows beyond anicm2017-04-19
| | | | | | | | | | | | | | | | | | 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-18
| | | | and there are some question marks about it's support.
* Detect iTerm2 and use DECSLRM for it as well.nicm2017-04-18
|
* Add a format for number of bytes writtent to client, useful for debugging.nicm2017-04-18
|
* Do not check for BCE for a background colour that isn't needed, usenicm2017-04-18
| | | | colour 8 instead.
* Don't bother moving the cursor for empty lines.nicm2017-04-17
|
* Remove a couple of redraw flags that no longer have any effect.nicm2017-04-17
|
* Use EL1 to clear lines when redrawing the leftmost pane, rather thannicm2017-04-16
| | | | spaces.
* Give each client a name. This defaults to the tty name as before butnicm2017-04-05
| | | | | | | 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.
* Write raw strings in one go rather than character at a time.nicm2017-03-24
|
* Add support for the strikethrough attribute (SGR 9), using the new smxxnicm2017-03-22
| | | | | terminfo capability. This means there are now nine attribute bits, so anything above 0xff uses an extended cell.
* Invalidate the cursor when we think we should have wrapped.nicm2017-03-15
|
* Try to avoid moving the cursor to the start of the next line whennicm2017-03-15
| | | | | | | printing cells if it is already at the very end of the line and the terminal will wrap it to the next line itself, this means terminals still see it as a wrapped line for the purposes of their own mouse selection. Reported by millert@.
* Always send smkx to the terminal outside, the keys we get from terminfonicm2017-03-08
| | | | are the keys when it is on.
* Collect strings correctly when on terminals that don't support UTF-8.nicm2017-03-06
|
* Change pane redraw to collect cells up as well, and simplify it a bit.nicm2017-02-21
|
* There are buggy terminals out there that do not move the cursor to 0,0nicm2017-02-16
| | | | after CSR, so invalidate the cursor position rather than assuming 0,0.
* Do not clear to end of screen unless the pane is at the bottom.nicm2017-02-15
|
* Add not delete the event if more to write.nicm2017-02-10
|
* Don't use a bufferevent for the tty, so we can keep better track of whatnicm2017-02-10
| | | | | | is being written and when. Also a manpage typo fix from jmc@.
* Another helper function to write to terminal and log.nicm2017-02-08
|
* Do not adjust region lower by pane offset when scrolling up, it isnicm2017-02-08
| | | | already an absolute position.
* Add support for scroll up escape sequence (CSI S) and use it whennicm2017-02-08
| | | | possible instead of sending individual line feeds.
* Collect sequences of printable ASCII characters and process themnicm2017-02-08
| | | | | | | | | | | | | | | 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).
* Fix clear start of line.nicm2017-02-08
|
* Some other tidying bits.nicm2017-02-08
|
* Remove unnecessary duplicate check.nicm2017-02-08
|
* Improve some of the logging on resize.nicm2017-02-08
|
* Log size of output buffer as well.nicm2017-02-08
|
* Trying to avoid the occasional newline by saving the last cell on screennicm2017-02-08
| | | | | is not actually helping us much and just adds complexity, so don't bother.
* Do not clear the scroll region, instead set it to the scroll region wenicm2017-02-07
| | | | actually want.
* DECSLRM in xterm(1) appears to have a quirk where it can generate annicm2017-02-07
| | | | | extra scroll of the entire terminal; issuing DECSTBM first prevents this. Do that for now.
* Unfortunately DECFRA does not handle default colours properly (it doesnicm2017-02-07
| | | | | not reset colours when in SGR 0), so we can't use it without more trouble than it is worth. Abandon the idea for now.
* Use DECFRA on VT420 compatible terminals (so, xterm) and ED on allnicm2017-02-06
| | | | others for clearing panes.
* Do not go through the whole attributes setting process if the new cellnicm2017-02-06
| | | | is the same as the previous one.
* Add BCE for clear to start of screen, which was somehow missed.nicm2017-02-06
|
* Only redraw the modified character when adding combining characters, notnicm2017-02-06
| | | | the whole line.
* Implement "all event" (1003) mouse mode but in a way that works. Thenicm2017-02-01
| | | | | | | | | | | main issue is that if we have two panes, A with 1002 and B with 1003, we need to set 1003 outside tmux in order to get all the mouse events, but then we need to suppress the ones that pane A doesn't want. This is easy in SGR mouse mode, because buttons == 3 is only used for movement events (for other events the trailing m/M marks a release instead), but in normal mouse mode we can't tell so easily. So for that, look at the previous event instead - if it is drag+release as well, then the current event is a movement event.
* aixterm colours can be used if -2 is given, as well as if TERM tells usnicm2017-01-12
| | | | the terminal has >=16 colours.
* Fix setting the palette of aixterm colours (90-97).nicm2017-01-12
|
* Be less aggressive about turning margins off.nicm2017-01-11
|
* Add some missing special keys to key_string_lookup_key, fix a mousenicm2017-01-11
| | | | check in server_client_handle_key, and tweak a comment.
* Add a format for terminal type.nicm2017-01-11
|