mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
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.
This commit is contained in:
parent
ab3af2af37
commit
f3e443ea47
2 changed files with 19 additions and 1 deletions
|
|
@ -64,6 +64,12 @@
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* OSC-9: sequences beginning with `<number>;` are now ignored. These
|
||||||
|
sequences are ConEmu/Windows Terminal sequences, and not intended to
|
||||||
|
be notifications.
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
14
osc.c
14
osc.c
|
|
@ -1231,10 +1231,22 @@ osc_dispatch(struct terminal *term)
|
||||||
osc_uri(term, string);
|
osc_uri(term, string);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9: {
|
||||||
/* iTerm2 Growl notifications */
|
/* 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);
|
osc_notify(term, string);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 10: /* fg */
|
case 10: /* fg */
|
||||||
case 11: /* bg */
|
case 11: /* bg */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue