Skip to content

Commit

Permalink
fix(lib): send carriage return after title to fix ohmyzsh#11314 (oh…
Browse files Browse the repository at this point in the history
…myzsh#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 ohmyzsh#11314
  • Loading branch information
lawtonnichols authored Jan 11, 2023
1 parent 4181e8a commit 3dd83a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/termsupport.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3dd83a2

Please sign in to comment.