diff --git a/scripts/config.sh b/scripts/config.sh index 89fb409..a1af56d 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -85,11 +85,11 @@ fingers_defaults=( \ [fingers-hint-position]="left" \ [fingers-hint-format]="#[fg=yellow,bold]%s" \ - [fingers-highlight-format]="#[fg=yellow,bold,dim]%s" \ + [fingers-highlight-format]="#[fg=yellow,nobold,dim]%s" \ [fingers-hint-position-nocompact]="right" \ [fingers-hint-format-nocompact]="#[fg=yellow,bold][%s]" \ - [fingers-highlight-format-nocompact]="#[fg=yellow,bold,dim]%s" \ + [fingers-highlight-format-nocompact]="#[fg=yellow,nobold,dim]%s" \ ) set_tmux_env 'fingers-patterns' diff --git a/scripts/fingers.sh b/scripts/fingers.sh index cd82594..2dc73ea 100755 --- a/scripts/fingers.sh +++ b/scripts/fingers.sh @@ -90,7 +90,7 @@ function toggle_compact_state() { fi } -function toggle_help() { +function toggle_help_state() { if [[ $help_state == "0" ]]; then help_state=1 else @@ -132,19 +132,22 @@ while read -rsn1 char; do continue fi + prev_help_state="$help_state" + prev_compact_state="$compact_state" + if [[ $char == "$BACKSPACE" ]]; then input="" continue elif [[ $char == "" ]]; then if [[ $help_state == "1" ]]; then - toggle_help + toggle_help_state else exit fi elif [[ $char == "" ]]; then toggle_compact_state elif [[ $char == "?" ]]; then - toggle_help + toggle_help_state else input="$input$char" fi @@ -152,7 +155,9 @@ while read -rsn1 char; do if [[ $help_state == "1" ]]; then show_help "$fingers_pane_id" else - show_hints "$fingers_pane_id" $compact_state + if [[ "$prev_compact_state" != "$compact_state" ]]; then + show_hints "$fingers_pane_id" "$compact_state" + fi fi result=$(lookup_match "$input")