fix(termsupport): set title correctly on terminals with parameterized tsl (#14052)

Co-authored-by: Fran Rogers <fran@violuma.net>
This commit is contained in:
Robby Russell
2026-09-09 17:12:33 +02:00
committed by GitHub
co-authored by Fran Rogers
parent 8e5f198226
commit e8b1cca662
+6 -1
View File
@@ -31,7 +31,12 @@ function title {
else
# Try to use terminfo to set the title if the feature is available
if (( ${+terminfo[fsl]} && ${+terminfo[tsl]} )); then
print -Pn "${terminfo[tsl]}$1${terminfo[fsl]}"
# Emit the capabilities with echoti so terminfo does its own parameter
# substitution: some terminals (vt320) take a column argument, and
# running prompt expansion over the capability string mangles it.
echoti tsl 0
print -Pn "$1"
echoti fsl
fi
fi
;;