summaryrefslogtreecommitdiffstats
path: root/tty-term.c
AgeCommit message (Collapse)Author
2021-06-10Fix warnings, from Jan Tache in GitHub issue 2692.nicm
2021-06-10Three changes to fix problems with xterm in VT340 mode, reported bynicm
Thomas Sattler. 1) Do not include the DECSLRM or DECFRA features for xterm; they will be added instead if secondary DA responds as VT420 (this happens already). 2) Set or reset the individual flags after terminal-overrides is applied, so the user can properly disable them. 3) Add a capability for DECFRA ("Rect").
2021-03-01There is no need to call del_curterm in the server anymore.nicm
2021-02-17Move the call to setupterm() into the client and have it pass thenicm
results to the server over imsg, means the server does not need to enter ncurses or read terminfo db. Old clients will not work with a new server.
2021-02-05Send Unicode directional isolate characters around horizontal panenicm
borders if the terminal support UTF-8 and an extension terminfo(5) capability "Bidi" is present. On terminals with BiDi support (ie, VTE) this seems to be enough to display right-to-left text acceptably enough to be usable (with some caveats about the mouse position). Requested by and with help from Mahmoud Elagdar in GitHub issue 2425.
2020-10-13Set RGB flag if capabilities are present, GitHub issue 2418.nicm
2020-10-05Use the setal capability as well as (tmux's) Setulc.nicm
2020-08-24Do not run off end of string when stripping delays, reported by Davenicm
Vandervies.
2020-06-05Fix various confusion about am vs xenl.nicm
2020-05-16Add a terminal feature for enable/disable extended keys (supported bynicm
xterm and mintty) and add an option to make tmux send it. Only forward extended keys if the application has requested them, even though we use the CSI u sequence and xterm uses CSI 27 ~ - this is what mintty does as well.
2020-05-16Instead of having a default set of terminals in terminal-overrides thatnicm
get XT added and using that as a marker for xterm(1)-like, assume that if the terminfo(5) entry already has XT or the clear capability starts with CSI then the terminal is VT100-like and it should be safe to send DA requests. The DA responses trigger additional features being added.
2020-05-16Add extension terminfo(5) capabilities for margins.nicm
2020-04-23Overrides need to be applied both before and after features in case theynicm
change flags used to detect a feature.
2020-04-20Apply terminal-overrides after terminal detection, it always takesnicm
precedence.
2020-04-20Change the Sync capability to be a string instead of a flag.nicm
2020-04-20Tidy up the terminal detection and feature code and add named sets ofnicm
terminal features, each of which are defined in one place and map to a builtin set of terminfo(5) capabilities. Features can be specified based on TERM with a new terminal-features option or with the -T flag when running tmux. tmux will also detect a few common terminals from the DA and DSR responses. This is intended to make it easier to configure tmux's use of terminfo(5) even in the presence of outdated ncurses(3) or terminfo(5) databases or for features which do not yet have a terminfo(5) entry. Instead of having to grok terminfo(5) capability names and what they should be set to in the terminal-overrides option, the user can hopefully just give tmux a feature name and let it do the right thing. The terminal-overrides option remains both for backwards compatibility and to allow tweaks of individual capabilities. tmux already did much of this already, this makes it tidier and simpler to configure.
2020-04-16Add support for the iTerm2 sychronized updates escape sequence whichnicm
drastically reduces flickering.
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-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-11-28Long lines and spacing fixes.nicm
2019-10-03Do not lazily use BUFSIZ for "I don't care what size" when buildingnicm
strings because it is only guaranteed to be 256 bytes and even the default 1024 is not always enough. Reported by Gregory Pakosz.
2019-08-05Add support for the SD (scroll down) escape sequence, GitHub issue 1861.nicm
2019-06-27Add support for underscore colours with Setulc capability, mostly fromnicm
Kai Moschcau.
2019-05-29Use VIS_CSTYLE for the arguments and add the missing escapes it cannicm
generate to the parser.
2019-05-13Add support for overline (SGR 53), from Ricardo Banffy.nicm
2019-04-25options_array_item_value cannot return NULL.nicm
2019-04-23Indicate an array option with a flag rather than a special type so thatnicm
in future will not have to be strings.
2019-03-18Make array options a sparse tree instead of an array of char * andnicm
remove the size limit.
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-05-07Handle terminfo colors > 256 correctly, GitHub issue 1337.nicm
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.)
2017-08-27Use kind and kri for S-Up/Down as well as kUP and kDN.nicm
2017-06-16Log terminal capabilities for each new terminal.nicm
2017-05-31Look for setrgbf and setrgbb terminfo extensions for RGB colour. This isnicm
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 ifnicm
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-03-22Add support for the strikethrough attribute (SGR 9), using the new smxxnicm
terminfo capability. This means there are now nine attribute bits, so anything above 0xff uses an extended cell.
2017-02-21Don't need is1,is2,is3 so remove them.nicm
2017-02-08Add support for scroll up escape sequence (CSI S) and use it whennicm
possible instead of sending individual line feeds.
2017-02-06Use DECFRA on VT420 compatible terminals (so, xterm) and ED on allnicm
others for clearing panes.
2017-01-24Convert terminal-overrides to an array option.nicm
2017-01-13Make options_get_string return const string.nicm
2016-12-09Spacing nits.nicm
2016-10-10Loads more static, except for cmd-*.c and window-*.c.nicm
2016-01-29Support for RGB colour, using the extended cell mechanism to avoidnicm
wasting unnecessary space. The 'Tc' flag must be set in the external TERM entry (using terminal-overrides or a custom terminfo entry), if not tmux will map to the closest of the 256 or 16 colour palettes. Mostly from Suraj N Kurapati, based on a diff originally by someone else.
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-11Style nits and line wrapping of function declarations.nicm
2015-11-18Sync the entire xmalloc.[ch] with the other users, but with the additionnicm
of xrealloc, xvasprintf, xvsnprintf.
2015-10-27Move struct options into options.c.nicm
2015-09-24Assign flag not number for flag types (we got away with it so farnicm
because that are a union). From Filipe Brandenburger.
2015-09-01Tweak some error messages/comments.nicm