aboutsummaryrefslogtreecommitdiff
path: root/osc.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-11-02 07:10:25 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-11-02 07:33:03 +0000
commitf3e443ea4709f94d5a5865d567f5e3647c8cf870 (patch)
tree6f1873c8dc5dc0aa0b24ca8853715ab4fe802ff7 /osc.c
parentunicode: update data files to 16.0 (diff)
osc: 9: ignore ConEmu/Windows Terminal sequences
OSC-9 sequences starting with "<number>;" are now ignored, as they are ConEmu sequences, and not iTerm notifications.
Diffstat (limited to 'osc.c')
-rw-r--r--osc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/osc.c b/osc.c
index 535e29c8..72f3c366 100644
--- a/osc.c
+++ b/osc.c
@@ -1231,10 +1231,22 @@ osc_dispatch(struct terminal *term)
osc_uri(term, string);
break;
- case 9:
+ case 9: {
/* iTerm2 Growl notifications */
+ const char *sep = strchr(string, ';');
+ if (sep != NULL) {
+ errno = 0;
+ char *end = NULL;
+ strtoul(string, &end, 10);
+ if (end == sep && errno == 0) {
+ /* Ignore ConEmu/Windows Terminal escape */
+ break;
+ }
+ }
+
osc_notify(term, string);
break;
+ }
case 10: /* fg */
case 11: /* bg */