mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
scripts: generate-builtin-terminfo: double-escape backslash in ST
Fixes an issue with XTGETTCAP, where escape sequences terminated with ST, and containing parameters were missing a trailing backslash.
This commit is contained in:
parent
37218be648
commit
fd743b5173
2 changed files with 6 additions and 0 deletions
|
|
@ -84,6 +84,8 @@
|
|||
(e.g. KDE/plasma).
|
||||
* Nanosecs "overflow" when calculating timeout value for
|
||||
`resize-delay-ms` option.
|
||||
* Missing backslash in ST terminator in escape sequences in the
|
||||
built-in terminfo (accessed via XTGETTCAP).
|
||||
|
||||
[1173]: https://codeberg.org/dnkl/foot/issues/1173
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,10 @@ class StringCapability(Capability):
|
|||
value = re.sub(r'\\E([0-7])', r'\\033" "\1', value)
|
||||
value = re.sub(r'\\E', r'\\033', value)
|
||||
else:
|
||||
# Need to double-escape backslashes. These only occur in
|
||||
# ‘\E\’ combos. Note that \E itself is updated below
|
||||
value = value.replace('\\E\\\\', '\\E\\\\\\\\')
|
||||
|
||||
# Need to double-escape \E in C string literals
|
||||
value = value.replace('\\E', '\\\\E')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue