summaryrefslogtreecommitdiff
path: root/src/keymap.c
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@src.gnome.org>2003-01-22 21:35:22 +0000
committerNalin Dahyabhai <nalin@src.gnome.org>2003-01-22 21:35:22 +0000
commitf39e281529827f68fd0e9bba41785d66a21efc1c (patch)
treebb7ca26dcac6d55c0bc0f8d1ab5d5575c1147c36 /src/keymap.c
parent63941dffa610f8dac423c059eab909615d5cc7b9 (diff)
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).
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 5963764..9aaa3af 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -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;