From e8b1cca662c2096697422e315e08a56716f4dd6a Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Wed, 9 Sep 2026 08:12:33 -0700 Subject: [PATCH] fix(termsupport): set title correctly on terminals with parameterized tsl (#14052) Co-authored-by: Fran Rogers --- lib/termsupport.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 852a543c5..74dc3d25f 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -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 ;;