summaryrefslogtreecommitdiffstats
path: root/tty.c
AgeCommit message (Collapse)Author
2020-01-29Do not send DA and DSR again if already have a response.nicm
2020-01-28If we can identify the terminal as iTerm2 or as tmux, we can be surenicm
they support 256 and RGB colours, so set those flags too.
2020-01-13Stop handling DA and DSR after a second (they should be the first thingnicm
sent) so this should be plenty.
2020-01-13Be more specific in the DSR we are looking for so it doesn't getnicm
confused with mouse sequences. Also set a flag and don't bother checking for it if we have already seen it (same for DA), and don't check if we never asked for it.
2020-01-12Detect iTerm2 and enable DECSLRM.nicm
2020-01-12The terminal type was never as much use as I expected so remove it innicm
favour of a couple of flags for the features used (DECSLRM and DECFRA). Also rename the flag for no xenl to be more obvious while here.
2019-12-11Do not set cursor colour to default unless it has been changed, GitHubnicm
issue 2013.
2019-11-28Long lines and spacing fixes.nicm
2019-11-28Store xpixel/ypixel from TIOCGWINSZ and add formats.nicm
2019-11-14CUB and CUF are also limited by the margins so use CUP instead whennicm
margins are enabled (we already do this for linefeed).
2019-09-19Do not use bright when emulating 256 colours on an 8 colour terminalnicm
because it is also bold on some terminals. GitHub issue 1914.
2019-08-05Add support for the SD (scroll down) escape sequence, GitHub issue 1861.nicm
2019-08-01xterm 348 now disables margins when resized, so send DECLRMM again.nicm
2019-07-16Fix check for wrapping when redrawing entire lines, GitHub issue 1836.nicm
2019-06-27Add support for underscore colours with Setulc capability, mostly fromnicm
Kai Moschcau.
2019-06-26Fix some comments (top/bottom not left/right).nicm
2019-06-20Add a per-pane option set. Pane options inherit from window options (sonicm
there should be no change to existing behaviour) and are set and shown with set-option -p and show-options -p. Change remain-on-exit and window-style/window-active-style to be pane options (some others will be changed later). This makes select-pane -P and -g unnecessary so no longer document them (they still work) and no longer document set-window-option and show-window-options in favour of set-option -w and show-options -w.
2019-05-30I had hoped that non-xenl terminals had died out, at least in fairlynicm
modern OSs, but no - DragonFly BSD's console returns to haunt us. Fix it at least somewhat. GitHub issue 1763.
2019-05-13Add support for overline (SGR 53), from Ricardo Banffy.nicm
2019-04-25Need a fallback for -2 for aixterm colours.nicm
2019-04-24Use bg not fg when adjusting for aixterm, from Ailin Nemui.nicm
2019-04-17Set the window size as well as the layout size when using the presetnicm
layouts.
2019-03-14Fix ED1 (clear end of screen), reported by Marc Reisner.nicm
2019-03-14Add a wrapper (struct style) around styles rather than using thenicm
grid_cell directly. There will be some non-cell members soon.
2019-03-13Need to set attributes before clearing.nicm
2019-03-12Set a flag on cells are genuinely empty (cleared and never written to)nicm
and use tty_clear_line (which will choose the best escape sequence) to clear any batches of cells with that flag when redrawing a line from the stored screen.
2019-03-04Don't set client offset if client is not a terminalnicm
2019-01-20Should use DECFRA if not default, not if default. From Karl Beldan.nicm
2019-01-15Should save the bg colour when setting it to default, not the fg.nicm
2018-11-19evbuffer_new and bufferevent_new can both fail (when malloc fails) andnicm
return NULL. GitHub issue 1547.
2018-10-25Add a "terminal" colour which can be used instead of "default" in stylenicm
options for the terminal default colour, bypassing any inheritance from other options. Prompted by a discussion with abieber@.
2018-10-18Support for windows larger than visible on the attached client. This hasnicm
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.
2018-10-18Support for extended underline styles on terminals which offer them,nicm
enabled by adding the Smulx capability with terminal-overrides (add something like ',vte*:Smulx=\E[4\:%p1%dm'). GitHub issue 1492.
2018-09-25Allow panes to be 1 line or column by redrawing instead of using thenicm
scroll region, from Soeren Tempel in GitHub issue 1487.
2018-09-11The cursor position is limited to the margins for CUF and CUB, so turnnicm
margins off for printing cells (like most everything else already does). Problem reported by Thomas Sattler.
2018-08-19Add a client redraw-window flag instead of the redraw-all flag and fornicm
all just use the three flags together (window, borders, status).
2018-08-18Some tidying and helper functions.nicm
2018-07-04Add accessors for grid linedata member, for some future work. From Dannicm
Aloni.
2018-05-07Handle terminfo colors > 256 correctly, GitHub issue 1337.nicm
2018-04-23rxvt-unicode has some funny behaviour when scrolling with the cursor notnicm
at column 1, so move it back there first if possible. GitHub issue 1318.
2018-02-04Upstream ncurses has introduced terminfo capabilities to specify RGBnicm
colour ("true" or "direct" colour). These consist of new entries (such as "xterm-direct") which have a different setaf/setab implementation, colors and pairs set to 0x1000000 and 0x10000, and a new RGB flag. The setaf/setab definitions seem to be geared towards what ncurses (or emacs maybe) needs, in that the new versions do only ANSI and RGB colours (they can't be used for the 256 colour palette); they rely on the silly ISO colon-separated version of SGR; and they use a weird multiplication scheme so they still only need one argument. The higher values of colors and pairs require a recent ncurses to parse. tmux can use the RGB flag to detect RGB colour support (keeping the old Tc extension for backwards compatibility for now). However, as we still want to send 256 colour information unchanged when possible, the new setaf/setab are awkward. So when RGB is present, reserve setaf/setab only for ANSI colours and use the escape sequences directly for 256 and RGB colours. (To my knowledge no recent terminal uses unusual escape sequences for these in any case.)
2018-01-16Fix drawing of ACS characters (they need to go character-at-a-time),nicm
accidentally broken in last commit.
2018-01-12Simplify character replacement on non-UTF-8 terminals and make a commonnicm
function.
2017-11-15If there is a double width character at the very end of the line withnicm
not enough room to draw it, just leave it out.
2017-10-16Infrastructure for drawing status lines of more than one line in height,nicm
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.nicm
2017-08-21Same as previous for \r alone.nicm
2017-08-21Do not emit \r\n to move to column 0 if there are margins, because itnicm
will instead move to the margin left.
2017-07-21Use the actual width written rather than the possible width to clear.nicm
2017-07-21Trim trailing spaces from full line when it is clearly OK to do so.nicm