mirror of
https://github.com/wez/wezterm.git
synced 2024-08-16 17:50:28 +03:00
fix: skip FreshLine by semantic integration in ble.sh
ble.sh keeps track of the cursor position in the terminal display---including the horizontal position relative to the bottom of the terminal---based on the terminal control sequences that it sends. However, with WezTerm's shell integration, WezTerm inserts the newline (FreshLine) in PROMPT_COMMAND, which breaks the cursor position tracking of ble.sh. The needed cursor position adjustment at the end of the command execution is already performed by ble.sh, so WezTerm does not need to adjust it. In this patch, we skip the request for FreshLine.
This commit is contained in:
parent
95581d8697
commit
c2ac98503c
@ -481,7 +481,14 @@ __wezterm_semantic_precmd() {
|
||||
printf "\033]133;D;%s;aid=%s\007" "$ret" "$$"
|
||||
fi
|
||||
# Fresh line and start the prompt
|
||||
printf "\033]133;A;cl=m;aid=%s\007" "$$"
|
||||
if [[ -n "${BLE_VERSION-}" ]]; then
|
||||
# FreshLine breaks ble.sh's cursor position tracking. Also, the cursor
|
||||
# position adjustment is already performed ble.sh so unnecessary here. We
|
||||
# here only perform StartPrompt.
|
||||
printf "\033]133;P\007"
|
||||
else
|
||||
printf "\033]133;A;cl=m;aid=%s\007" "$$"
|
||||
fi
|
||||
__wezterm_semantic_precmd_executing=0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user