summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLawton Nichols <lawtonnichols@users.noreply.github.com>2023-01-11 10:44:29 -0800
committerGitHub <noreply@github.com>2023-01-11 19:44:29 +0100
commit3dd83a22a160249a71631a51490fd3b89d1b3975 (patch)
tree8b55b3063fc760524563a80d2939f87e3844c4f1 /lib
parent4181e8a2cc936bc7b7a89d674bf261023159ed35 (diff)
downloadzsh-3dd83a22a160249a71631a51490fd3b89d1b3975.tar.gz
zsh-3dd83a22a160249a71631a51490fd3b89d1b3975.tar.bz2
zsh-3dd83a22a160249a71631a51490fd3b89d1b3975.zip
fix(lib): send carriage return after `title` to fix #11314 (#11315)
Window and tab titles are changed by emitting an unprintable escape sequence to the terminal. These escape sequences do not play nicely with the TAB character on multiple terminal emulators--they create un-deletable characters on the first line after command execution. Sending "\r" after changing the window and tab titles allows all characters on the first line to be deleted. Fixes #11314
Diffstat (limited to 'lib')
-rw-r--r--lib/termsupport.zsh2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index 80ca7ef78..fc1cde55e 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -36,6 +36,8 @@ function title {
fi
;;
esac
+
+ print -Pn "\r" # move the cursor to the beginning of the line
}
ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD