summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty.c
AgeCommit message (Collapse)Author
2017-10-16Infrastructure for drawing status lines of more than one line in height,Nicholas Marriott
still only one is allowed but this lets tmux draw bigger ones.
2017-08-24When tty is error or closed, remove client. Reported by Thomas Sattler.Nicholas Marriott
2017-08-21Same as previous for \r alone.Nicholas Marriott
2017-08-21Do not emit \r\n to move to column 0 if there are margins, because itNicholas Marriott
will instead move to the margin left.
2017-07-21Use the actual width written rather than the possible width to clear.Nicholas Marriott
2017-07-21Trim trailing spaces from full line when it is clearly OK to do so.Nicholas Marriott
2017-06-06Delete input event when evbuffer_read() fails to avoid just spinningNicholas Marriott
around a dead file descriptor. Seems to fix a problem reported by Greg Hurrell in GitHub issue 941.
2017-06-04Typo/style; plus man page escaping from jmc.Nicholas Marriott
2017-06-03Foreground colours with the bright attribute set need to use the brightNicholas Marriott
entries in the palette. GitHub issue 954.
2017-05-31It is not OK to ignore SIGWINCH if SIOCGWINSZ reports the size hasNicholas Marriott
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.
2017-05-31Look for setrgbf and setrgbb terminfo extensions for RGB colour. This isNicholas Marriott
the most reasonable of the various (some bizarre) suggestions for capabilities.
2017-05-15Check the terminfo(5) U8 capability and disable using UTF-8 for ACS ifNicholas Marriott
it is present and zero. This is useful for users with terminals or fonts that do not correctly support UTF-8 line drawing characters. GitHub issue 927, reported by Hiroaki Yamazoe and Akinori Hattori.
2017-05-15The Konsole SU bug means it can't clear the entire scroll region (itNicholas Marriott
ignores if >= size, not if > as I first thought). So we can't effectively fix it in code - remove the workarounds which just cause bugs on other terminals.
2017-05-13Scroll the right number of lines off the region when clearing.Nicholas Marriott
2017-05-13Some other unused variables.Nicholas Marriott
2017-05-12Compare >= for columns not >.Nicholas Marriott
2017-05-12Can scroll away full lines to clear them too.Nicholas Marriott
2017-05-12Cannot rely on cursor position after DL and IL (some terminals move toNicholas Marriott
column 0, some do not).
2017-05-12Scrolling needs to use background colour.Nicholas Marriott
2017-05-12Regions can't be smaller than 2 so don't try to clear them by scrolling if so.Nicholas Marriott
2017-05-12Can use INDN to clear regions with default background colour if marginsNicholas Marriott
are supported.
2017-05-12ECH needs to use background colour.Nicholas Marriott
2017-05-12Can use DECFRA to clear area when not using default background.Nicholas Marriott
2017-05-11Need to redraw out to cellsize (total cells used in a line) rather thanNicholas Marriott
cellused (only non-space cells) because there may be cells with a nondefault background.
2017-05-10Move to the right cursor position before using spaces to clear.Nicholas Marriott
2017-05-10We can use ECH to clear sections of lines, so use it for internal panesNicholas Marriott
(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.
2017-05-09If the current screen was complex enough, it was possible to make redrawNicholas Marriott
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.
2017-04-28Konsole incorrectly ignores SU (CSI S) if the parameter is bigger thanNicholas Marriott
the scroll region, so clamp it. Reported by Moritz Bunkus.
2017-04-25Make full width panes try to play more nicely with terminal copy andNicholas Marriott
paste by avoiding explicit line wraps if we think the terminal will wrap anyway.
2017-04-23Only use ED for clear screen if at the bottom, same as earlier fix toNicholas Marriott
clear end of screen.
2017-04-19When the data we have buffered to write to a terminal grows beyond aNicholas Marriott
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.
2017-04-18Revert use of DECSLRM on iTerm2, it doesn't help as much as we throught,Nicholas Marriott
and there are some question marks about it's support.
2017-04-18Detect iTerm2 and use DECSLRM for it as well.Nicholas Marriott
2017-04-18Add a format for number of bytes writtent to client, useful for debugging.Nicholas Marriott
2017-04-18Do not check for BCE for a background colour that isn't needed, useNicholas Marriott
colour 8 instead.
2017-04-17Don't bother moving the cursor for empty lines.Nicholas Marriott
2017-04-17Remove a couple of redraw flags that no longer have any effect.Nicholas Marriott
2017-04-16Use EL1 to clear lines when redrawing the leftmost pane, rather thanNicholas Marriott
spaces.
2017-04-05Give each client a name. This defaults to the tty name as before butNicholas Marriott
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.
2017-04-05Change tty_repeat_space to write large sets of spaces together insteadNicholas Marriott
of writing them individually.
2017-03-24Write raw strings in one go rather than character at a time.Nicholas Marriott
2017-03-22Add support for the strikethrough attribute (SGR 9), using the new smxxNicholas Marriott
terminfo capability. This means there are now nine attribute bits, so anything above 0xff uses an extended cell.
2017-03-15Invalidate the cursor when we think we should have wrapped.Nicholas Marriott
2017-03-15Try to avoid moving the cursor to the start of the next line whenNicholas Marriott
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@.
2017-03-08Always send smkx to the terminal outside, the keys we get from terminfoNicholas Marriott
are the keys when it is on.
2017-03-06Collect strings correctly when on terminals that don't support UTF-8.Nicholas Marriott
2017-02-21Change pane redraw to collect cells up as well, and simplify it a bit.Nicholas Marriott
2017-02-16There are buggy terminals out there that do not move the cursor to 0,0Nicholas Marriott
after CSR, so invalidate the cursor position rather than assuming 0,0.
2017-02-15Do not clear to end of screen unless the pane is at the bottom.Nicholas Marriott
2017-02-10Add not delete the event if more to write.Nicholas Marriott