-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wezterm, vim-airline] lualine over cursor #413
Comments
Confirmed with # bashrc
HISTFILE=~/tmp
source /path/to/ble.sh --norc
set -o vi
ble-import vim-airline
bleopt vim_airline_theme=light
source wezterm.sh The problem is suppressed when WezTerm's semantic zone of the shell integration is disabled. [...]
WEZTERM_SHELL_SKIP_SEMANTIC_ZONES=1
source wezterm.sh The problem is also suppressed when this line in I think WezTerm doesn't assume a concept of the status line at the bottom as a shell prompt. I'm not sure what would be the assumptions of Wezterm and how Wezterm responds to those OSC sequences. We probably need the help of Wez. |
I visited the repository of WezTerm and found that many Issues and PRs pop up every day. Wez must be super extremely busy. I'll take time to look into the codebase.
The sequence OSC(A;...) produces If that is correct, the problem would be solved by this change. diff --git a/assets/shell-integration/wezterm.sh b/assets/shell-integration/wezterm.sh
index 1cc83f86c..524604833 100644
--- a/assets/shell-integration/wezterm.sh
+++ b/assets/shell-integration/wezterm.sh
@@ -481,7 +481,13 @@ __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
+ # Fresh line breaks ble.sh's cursor position tracking. Also, the cursor
+ # position adjustment is already performed ble.sh so unnecessary here.
+ printf "\033]133;P\007"
+ else
+ printf "\033]133;A;cl=m;aid=%s\007" "$$"
+ fi
__wezterm_semantic_precmd_executing=0
}
I'll later test it because I don't have an environment now. |
I submitted a PR to WezTerm, but you can set the following setting for the time being: # blerc
bleopt prompt_command_changes_layout=1 |
seems to work.Thanks! |
ble version:
Bash version:
When the space on screen finish, and you press carriage return without issuing any command, lualine collocates itself in front of the cursor, and what you write gets hidden by lualine:
Here is a video:
20240219T165217.webm
The text was updated successfully, but these errors were encountered: