Commit f39e2815 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

accept OSC{number};{string}ST as set-text-parameters, per XTerm docs (part

* src/caps.c: accept OSC{number};{string}ST as set-text-parameters, per XTerm
	docs (part of #104154).
* src/keymap.c: revert change to prepend "1;" to keys with modifiers (#104139).
parent 63941dff
2003-01-22 nalin
* src/caps.c: accept OSC{number};{string}ST as set-text-parameters,
per XTerm docs (part of #104154).
* src/keymap.c: revert change to prepend "1;" to keys with
modifiers (#104139).
2003-01-22 Christian Rose <menthos@menthos.com>
* configure.in: Added "mn" to ALL_LINGUAS.
......
......@@ -513,6 +513,7 @@ struct _vte_capability_string _vte_xterm_capability_strings[] = {
{CSI "%m'{", "select-locator-events", 0},
{CSI "%d'|", "request-locator-position", 0},
/* Set text parameters, BEL-terminated versions. */
{OSC ";%s" BEL, "set-icon-and-window-title", 0}, /* undocumented default */
{OSC "0;%s" BEL, "set-icon-and-window-title", 0},
{OSC "1;%s" BEL, "set-icon-title", 0},
......@@ -531,6 +532,25 @@ struct _vte_capability_string _vte_xterm_capability_strings[] = {
{OSC "50;#%d" BEL, "change-font-number", 0},
{OSC "50;%s" BEL, "change-font-name", 0},
/* Set text parameters, ST-terminated versions. */
{OSC ";%s" ST, "set-icon-and-window-title", 0}, /* undocumented default */
{OSC "0;%s" ST, "set-icon-and-window-title", 0},
{OSC "1;%s" ST, "set-icon-title", 0},
{OSC "2;%s" ST, "set-window-title", 0},
{OSC "3;%s" ST, "set-xproperty", 0},
{OSC "4;%s" ST, "change-color", 0},
{OSC "10;%s" ST, "change-foreground-colors", 0},
{OSC "11;%s" ST, "change-background-colors", 0},
{OSC "12;%s" ST, "change-cursor-colors", 0},
{OSC "13;%s" ST, "change-mouse-cursor-foreground-colors", 0},
{OSC "14;%s" ST, "change-mouse-cursor-foreground-colors", 0},
{OSC "15;%s" ST, "change-tek-background-colors", 0},
{OSC "16;%s" ST, "change-tek-background-colors", 0},
{OSC "17;%s" ST, "change-highlight-colors", 0},
{OSC "46;%s" ST, "change-logfile", 0},
{OSC "50;#%d" ST, "change-font-number", 0},
{OSC "50;%s" ST, "change-font-name", 0},
{NULL, NULL, 0},
};
......
......@@ -1286,18 +1286,31 @@ _vte_keymap_key_add_key_modifiers(guint keyval,
nnormal = g_malloc0(*normal_length + 4);
memcpy(nnormal, *normal, *normal_length);
if (strlen(nnormal) > 1) {
/* Get the offset of the last character. */
offset = strlen(nnormal) - 1;
if (g_ascii_isdigit(nnormal[offset - 1])) {
/* Stuff a semicolon and the modifier in right before
* that last character. */
nnormal[offset + 2] = nnormal[offset];
nnormal[offset + 1] = modifier + '0';
nnormal[offset + 0] = ';';
*normal_length += 2;
} else {
#if 0
/* Stuff a "1", a semicolon and the modifier in right
* before that last character, matching Xterm. */
nnormal[offset + 3] = nnormal[offset];
nnormal[offset + 2] = modifier + '0';
nnormal[offset + 1] = ';';
nnormal[offset + 0] = '1';
*normal_length += 3;
#else
/* Stuff the modifier in right before that last
* character, matching what people expect. */
nnormal[offset + 1] = nnormal[offset];
nnormal[offset + 0] = modifier + '0';
*normal_length += 1;
#endif
}
g_free(*normal);
*normal = nnormal;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment