Merge pull request #1192 from madcarrot/master

Update powerline theme to avoid overlapping left and right prompt
pull/1199/head
Nils Winkler 2018-05-24 08:20:14 +02:00 committed by GitHub
commit 1b887b2916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -46,11 +46,13 @@ function __powerline_prompt_command {
## right prompt ##
if [[ -n "${POWERLINE_RIGHT_PROMPT}" ]]; then
LEFT_PROMPT+="${move_cursor_rightmost}"
# LEFT_PROMPT+="${move_cursor_rightmost}"
for segment in $POWERLINE_RIGHT_PROMPT; do
local info="$(__powerline_${segment}_prompt)"
[[ -n "${info}" ]] && __powerline_right_segment "${info}"
done
RIGHT_PAD=$(printf "%.s " $(seq 1 $RIGHT_PROMPT_LENGTH))
LEFT_PROMPT+="${RIGHT_PAD}${move_cursor_rightmost}"
LEFT_PROMPT+="\033[${RIGHT_PROMPT_LENGTH}D"
fi