From 151032b726a3aa5fb9cf69861a70aa9a6704bcd4 Mon Sep 17 00:00:00 2001 From: Thomas Preisner Date: Wed, 22 May 2019 16:19:31 +0200 Subject: [PATCH] zsh: prompt.zsh: fix rprompt indent Various shells apparently do not support ZLE_RPROMPT_IDENT=0 properly and shift the cursor one to the left. As a result, autocompleting leads to weird shifting of the user input and 'overlapping' text. In order to fix this issue, it seems to be sufficient to set ZLE_RPROMPT_INDENT=-1. (see https://github.com/bhilburn/powerlevel9k/issues/110) --- zsh/prompt.zsh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh index a2d8fac..e625ee9 100644 --- a/zsh/prompt.zsh +++ b/zsh/prompt.zsh @@ -89,14 +89,8 @@ zshrc_prompt_precmd() { # suffix characters in first and second line local top_suffix="%F{cyan}${top_right_corner}%f" local bottom_suffix="%F{cyan}${bottom_right_corner}%f" - # use %{ .. %} for bottom_right_corner to remove useless space after RPROMPT # remove useless space after RPROMPT - if [[ $TERM != "tmux-256color" ]]; then - # use %{ .. %} for bottom_right_corner if not in tmux - bottom_suffix="%{${bottom_suffix}%}" - else - ZLE_RPROMPT_INDENT=0 - fi + ZLE_RPROMPT_INDENT=-1 # combine them to create the prompt local top_left=""