dcs: xtgettcap: always reply with tigetstr(3) formatted "strings"

That is, instead of sometimes replying with a "source" encoded
string (where e.g. '\E' are returned just like that, and not as an
actual ESC), always unescape all string values.

This also includes \n \r \t \b \f \s, \^ \\ \ \:, as well as ^x-styled
escapes.

Closes #1701
This commit is contained in:
Daniel Eklöf 2024-04-27 09:38:55 +02:00
parent 4d4ef5eed5
commit a3debf7741
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 60 additions and 21 deletions

View file

@ -55,6 +55,21 @@
## Unreleased
### Added
### Changed
* All `XTGETTCAP` capabilities are now in the `tigetstr()` format:
- parameterized string capabilities were previously "source
encoded", meaning e.g. `\E` where not "decoded" into `\x1b`.
- Control characters were also "source encoded", meaning they were
returned as e.g. "^G" instead of `\x07` ([#1701][1701]).
In other words, if, after this change, `XTGETTCAP` returns a string
that is different compared to `tigetstr()`, then it is likely a bug
in foot's implementation of `XTGETTCAP`.
[1701]: https://codeberg.org/dnkl/foot/issues/1701
### Deprecated
### Removed
### Fixed