-
-
Notifications
You must be signed in to change notification settings - Fork 134
Fixes terminal from deleting previous line on ESC #180
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
Conversation
As long as ESC isn't pressed twice within delay
This fixes the issue for me 🎉 Is there any reason why this isn't being merged? |
I'd love to merge this PR, but still need some time to get it test, thanks for waiting a longtime. Best Regards |
Any update? Would love to get this fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Mr. @jeffreytse function zvm_before_init(){
PROMPT=$'%F{blue}\u256D\U2500${OS_ICON} %F{#EF7A85}%n%f ${AT_SYMPOLE} ${MAC_ICON} %F{229}%m% ${PR_NO_COLOUR} on %F{#88c0d0}%~%f%F{%(0?.green.red)} %(0?.\uf08b.\uf071) %F{140}$(GPS) '
PS1+=$'\n%F{blue}${MULTILINE_NEWLINE_PROMPT_PREFIX}${ROBOT_ICON} %K{#533344}%F{#EF7A85}INSERT%{$reset_color%}%4v%f%F{120}%F{180}%F{blue}%{$reset_color%} %F{yellow}%1v%{$reset_color%} %K{239}$(git_time_since_commit)${PR_NO_COLOUR}${GITSTATUS_PROMPT:+$GITSTATUS_PROMPT} $(virtualenv_info)'
PS1+=$'\n%F{blue}\u2570${RULER_CHAR}%F{blue}${ARROW}%{$reset_color%} ' #
RPROMPT=$'%F{blue} %F{white}:%F{180}${prompt_elapsed_time} %F{yellow}${SYNC_ICON}%{$reset_color%} %{$fg[magenta]%}[ ${Date_ICON} %F{110} %D{%b %d, %Y}${PR_NO_COLOUR} - %{$fg[magenta]%}${CLOCK_ICON}%F{180} %D{%L:%M:%S %p}%{$fg[magenta]%} ] %{$reset_color%}'
}
# The plugin will auto execute this zvm_after_select_vi_mode function
# #The plugin will auto execute this zvm_after_select_vi_mode function
# #It will overwrite the initial prompt: zvm_before_init_commands
function zvm_after_select_vi_mode() {
case $ZVM_MODE in
$ZVM_MODE_NORMAL)
# Something you want to do...
PROMPT=$'%F{blue}\u256D\U2500${OS_ICON} %F{#94C9A9}%n%f ${AT_SYMPOLE} ${MAC_ICON} %F{229}%m% ${PR_NO_COLOUR} on %F{#88c0d0}%~%f%F{%(0?.green.red)} %(0?.\uf08b.\uf071) %F{140}$(GPS) '
PS1+=$'\n%F{blue}${MULTILINE_NEWLINE_PROMPT_PREFIX}${ROBOT_ICON} %K{#37505C}%F{#94C9A9}NORMAL%{$reset_color%}%4v%f%F{120}%F{180}%F{blue}%{$reset_color%} %F{yellow}%1v%{$reset_color%} %K{239}$(git_time_since_commit)${PR_NO_COLOUR}${GITSTATUS_PROMPT:+$GITSTATUS_PROMPT} $(virtualenv_info)'
PS1+=$'\n%F{blue}\u2570${RULER_CHAR}%F{blue}${ARROW}%{$reset_color%} ' #
;;
$ZVM_MODE_INSERT)
# Something you want to do...
PROMPT=$'%F{blue}\u256D\U2500${OS_ICON} %F{#EF7A85}%n%f ${AT_SYMPOLE} ${MAC_ICON} %F{229}%m% ${PR_NO_COLOUR} on %F{#88c0d0}%~%f%F{%(0?.green.red)} %(0?.\uf08b.\uf071) %F{140}$(GPS) '
PS1+=$'\n%F{blue}${MULTILINE_NEWLINE_PROMPT_PREFIX}${ROBOT_ICON} %K{#533344}%F{#EF7A85}INSERT%{$reset_color%}%4v%f%F{120}%F{180}%F{blue}%{$reset_color%} %F{yellow}%1v%{$reset_color%} %K{239}$(git_time_since_commit)${PR_NO_COLOUR}${GITSTATUS_PROMPT:+$GITSTATUS_PROMPT} $(virtualenv_info)'
PS1+=$'\n%F{blue}\u2570${RULER_CHAR}%F{blue}${ARROW}%{$reset_color%} ' #
;;
$ZVM_MODE_VISUAL)
# Something you want to do...
PROMPT=$'%F{blue}\u256D\U2500${OS_ICON} %F{208}%n%f ${AT_SYMPOLE} ${MAC_ICON} %F{229}%m% ${PR_NO_COLOUR} on %F{#88c0d0}%~%f%F{%(0?.green.red)} %(0?.\uf08b.\uf071) %F{140}$(GPS) '
PS1+=$'\n%F{blue}${MULTILINE_NEWLINE_PROMPT_PREFIX}${ROBOT_ICON} %K{#4E3651}%F{#EFC3F5}VISUAL%{$reset_color%}%4v%f%F{120}%F{180}%F{blue}%{$reset_color%} %F{yellow}%1v%{$reset_color%} %K{239}$(git_time_since_commit)${PR_NO_COLOUR}${GITSTATUS_PROMPT:+$GITSTATUS_PROMPT} $(virtualenv_info)'
PS1+=$'\n%F{blue}\u2570${RULER_CHAR}%F{blue}${ARROW}%{$reset_color%} ' #
;;
$ZVM_MODE_VISUAL_LINE)
# Something you want to do...
PROMPT=$'%F{blue}\u256D\U2500${OS_ICON} %F{208}%n%f ${AT_SYMPOLE} ${MAC_ICON} %F{229}%m% ${PR_NO_COLOUR} on %F{#88c0d0}%~%f%F{%(0?.green.red)} %(0?.\uf08b.\uf071) %F{140}$(GPS) '
PS1+=$'\n%F{blue}${MULTILINE_NEWLINE_PROMPT_PREFIX}${ROBOT_ICON} %K{239}%F{206}VISUAL*%{$reset_color%}%4v%f%F{120}%F{180}%F{blue}%{$reset_color%} %F{yellow}%1v%{$reset_color%} %K{239}$(git_time_since_commit)${PR_NO_COLOUR}${GITSTATUS_PROMPT:+$GITSTATUS_PROMPT} $(virtualenv_info)'
PS1+=$'\n%F{blue}\u2570${RULER_CHAR}%F{blue}${ARROW}%{$reset_color%} ' #
;;
$ZVM_MODE_REPLACE)
# Something you want to do...
PROMPT=$'%F{blue}\u256D\U2500${OS_ICON} %F{208}%n%f ${AT_SYMPOLE} ${MAC_ICON} %F{229}%m% ${PR_NO_COLOUR} on %F{#88c0d0}%~%f%F{%(0?.green.red)} %(0?.\uf08b.\uf071) %F{140}$(GPS) '
PS1+=$'\n%F{blue}${MULTILINE_NEWLINE_PROMPT_PREFIX}${ROBOT_ICON} %K{239}%F{200}REPLACE%{$reset_color%}%4v%f%F{120}%F{180}%F{blue}%{$reset_color%} %F{yellow}%1v%{$reset_color%} %K{239}$(git_time_since_commit)${PR_NO_COLOUR}${GITSTATUS_PROMPT:+$GITSTATUS_PROMPT} $(virtualenv_info)'
PS1+=$'\n%F{blue}\u2570${RULER_CHAR}%F{blue}${ARROW}%{$reset_color%} ' #
;;
esac
RPROMPT=$'%F{blue} %F{white}:%F{180}${prompt_elapsed_time} %F{yellow}${SYNC_ICON}%{$reset_color%} %{$fg[magenta]%}[ ${Date_ICON} %F{110} %D{%b %d, %Y}${PR_NO_COLOUR} - %{$fg[magenta]%}${CLOCK_ICON}%F{180} %D{%L:%M:%S %p}%{$fg[magenta]%} ] %{$reset_color%}'
}
|
PR#180, zsh-vi-modeでescapeしたときに適切にプロンプトがリセットされない問題が修正された。 そのため当分transient promptを設定して試行する。 jeffreytse/zsh-vi-mode#180
reverts a number of changes and fixes #136 #124 in tmux