Skip to content

Commit

Permalink
🐛 Fix 4 stuck characters when navigating through history commands
Browse files Browse the repository at this point in the history
This was related to the bold-prompt flag (fancygit --enable-bold-prompt).
When it was active, the tput crashed the history commands navigation in 4 bytes.
  • Loading branch information
diogocavilha committed Apr 14, 2023
1 parent dee4cc0 commit 3f7675a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions themes/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ fancygit_theme_builder() {
if fancygit_config_is "bold_prompt" "true"
then
bold_none=""
bold_prompt="$(tput bold)"
normal_prompt="$(tput sgr0)"
bold_prompt="\\[\\e[1m\\]"
normal_prompt="\\[\\e[0m\\]"
fi

# Prompt style
Expand Down
4 changes: 2 additions & 2 deletions themes/human.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ fancygit_theme_builder() {

if fancygit_config_is "bold_prompt" "true"
then
bold_prompt="$(tput bold)"
normal_prompt="$(tput sgr0)"
bold_prompt="\\[\\e[1m\\]"
normal_prompt="\\[\\e[0m\\]"
fi

# If we have a branch name, it means we are in a git repo, so we need to make some changes on PS1.
Expand Down
4 changes: 2 additions & 2 deletions themes/simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ fancygit_theme_builder() {

if fancygit_config_is "bold_prompt" "true"
then
bold_prompt="$(tput bold)"
normal_prompt="$(tput sgr0)"
bold_prompt="\\[\\e[1m\\]"
normal_prompt="\\[\\e[0m\\]"
fi

# Get theme config.
Expand Down

0 comments on commit 3f7675a

Please sign in to comment.