"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tty-features.c" between
tmux-3.2.tar.gz and tmux-3.2a.tar.gz

About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.

tty-features.c  (tmux-3.2):tty-features.c  (tmux-3.2a)
skipping to change at line 28 skipping to change at line 28
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "tmux.h" #include "tmux.h"
/* /*
* Still hardcoded: * Still hardcoded:
* - mouse (under kmous capability);
* - default colours (under AX or op capabilities); * - default colours (under AX or op capabilities);
* - AIX colours (under colors >= 16); * - AIX colours (under colors >= 16);
* - alternate escape (if terminal is VT100-like). * - alternate escape (if terminal is VT100-like).
* *
* Also: * Also:
* - DECFRA uses a flag instead of capabilities; * - DECFRA uses a flag instead of capabilities;
* - UTF-8 is a separate flag on the client; needed for unattached clients. * - UTF-8 is a separate flag on the client; needed for unattached clients.
*/ */
/* A named terminal feature. */ /* A named terminal feature. */
skipping to change at line 57 skipping to change at line 56
"tsl=\\E]0;", /* should be using TS really */ "tsl=\\E]0;", /* should be using TS really */
"fsl=\\a", "fsl=\\a",
NULL NULL
}; };
static const struct tty_feature tty_feature_title = { static const struct tty_feature tty_feature_title = {
"title", "title",
tty_feature_title_capabilities, tty_feature_title_capabilities,
0 0
}; };
/* Terminal has mouse support. */
static const char *tty_feature_mouse_capabilities[] = {
"kmous=\\E[M",
NULL
};
static const struct tty_feature tty_feature_mouse = {
"mouse",
tty_feature_mouse_capabilities,
0
};
/* Terminal can set the clipboard with OSC 52. */ /* Terminal can set the clipboard with OSC 52. */
static const char *tty_feature_clipboard_capabilities[] = { static const char *tty_feature_clipboard_capabilities[] = {
"Ms=\\E]52;%p1%s;%p2%s\\a", "Ms=\\E]52;%p1%s;%p2%s\\a",
NULL NULL
}; };
static const struct tty_feature tty_feature_clipboard = { static const struct tty_feature tty_feature_clipboard = {
"clipboard", "clipboard",
tty_feature_clipboard_capabilities, tty_feature_clipboard_capabilities,
0 0
}; };
skipping to change at line 221 skipping to change at line 231
"Cmg=\\E[%i%p1%d;%p2%ds", "Cmg=\\E[%i%p1%d;%p2%ds",
NULL NULL
}; };
static const struct tty_feature tty_feature_margins = { static const struct tty_feature tty_feature_margins = {
"margins", "margins",
tty_feature_margins_capabilities, tty_feature_margins_capabilities,
TERM_DECSLRM TERM_DECSLRM
}; };
/* Terminal supports DECFRA rectangle fill. */ /* Terminal supports DECFRA rectangle fill. */
static const char *tty_feature_rectfill_capabilities[] = {
"Rect",
NULL
};
static const struct tty_feature tty_feature_rectfill = { static const struct tty_feature tty_feature_rectfill = {
"rectfill", "rectfill",
NULL, tty_feature_rectfill_capabilities,
TERM_DECFRA TERM_DECFRA
}; };
/* Available terminal features. */ /* Available terminal features. */
static const struct tty_feature *tty_features[] = { static const struct tty_feature *tty_features[] = {
&tty_feature_256, &tty_feature_256,
&tty_feature_bpaste, &tty_feature_bpaste,
&tty_feature_ccolour, &tty_feature_ccolour,
&tty_feature_clipboard, &tty_feature_clipboard,
&tty_feature_cstyle, &tty_feature_cstyle,
&tty_feature_extkeys, &tty_feature_extkeys,
&tty_feature_focus, &tty_feature_focus,
&tty_feature_margins, &tty_feature_margins,
&tty_feature_mouse,
&tty_feature_overline, &tty_feature_overline,
&tty_feature_rectfill, &tty_feature_rectfill,
&tty_feature_rgb, &tty_feature_rgb,
&tty_feature_strikethrough, &tty_feature_strikethrough,
&tty_feature_sync, &tty_feature_sync,
&tty_feature_title, &tty_feature_title,
&tty_feature_usstyle &tty_feature_usstyle
}; };
void void
skipping to change at line 337 skipping to change at line 352
void void
tty_default_features(int *feat, const char *name, u_int version) tty_default_features(int *feat, const char *name, u_int version)
{ {
static struct { static struct {
const char *name; const char *name;
u_int version; u_int version;
const char *features; const char *features;
} table[] = { } table[] = {
#define TTY_FEATURES_BASE_MODERN_XTERM \ #define TTY_FEATURES_BASE_MODERN_XTERM \
"256,RGB,bpaste,clipboard,strikethrough,title" "256,RGB,bpaste,clipboard,mouse,strikethrough,title"
{ .name = "mintty", { .name = "mintty",
.features = TTY_FEATURES_BASE_MODERN_XTERM .features = TTY_FEATURES_BASE_MODERN_XTERM
",ccolour,cstyle,extkeys,margins,overline,usstyle" ",ccolour,cstyle,extkeys,margins,overline,usstyle"
}, },
{ .name = "tmux", { .name = "tmux",
.features = TTY_FEATURES_BASE_MODERN_XTERM .features = TTY_FEATURES_BASE_MODERN_XTERM
",ccolour,cstyle,focus,overline,usstyle" ",ccolour,cstyle,focus,overline,usstyle"
}, },
{ .name = "rxvt-unicode", { .name = "rxvt-unicode",
.features = "256,bpaste,ccolour,cstyle,title" .features = "256,bpaste,ccolour,cstyle,mouse,title"
}, },
{ .name = "iTerm2", { .name = "iTerm2",
.features = TTY_FEATURES_BASE_MODERN_XTERM .features = TTY_FEATURES_BASE_MODERN_XTERM
",cstyle,extkeys,margins,sync" ",cstyle,extkeys,margins,sync"
}, },
{ .name = "XTerm", { .name = "XTerm",
/*
* xterm also supports DECSLRM and DECFRA, but they can be
* disabled so not set it here - they will be added if
* secondary DA shows VT420.
*/
.features = TTY_FEATURES_BASE_MODERN_XTERM .features = TTY_FEATURES_BASE_MODERN_XTERM
",ccolour,cstyle,extkeys,focus,margins,rectfill" ",ccolour,cstyle,extkeys,focus"
} }
}; };
u_int i; u_int i;
for (i = 0; i < nitems(table); i++) { for (i = 0; i < nitems(table); i++) {
if (strcmp(table[i].name, name) != 0) if (strcmp(table[i].name, name) != 0)
continue; continue;
if (version != 0 && version < table[i].version) if (version != 0 && version < table[i].version)
continue; continue;
tty_add_features(feat, table[i].features, ","); tty_add_features(feat, table[i].features, ",");
 End of changes. 9 change blocks. 
5 lines changed or deleted 25 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)