Skip to content

Commit

Permalink
wrappers: Reimplement using Mikachu's zle-line-pre-redraw hook (worke…
Browse files Browse the repository at this point in the history
…rs/36650).
  • Loading branch information
danielshahaf authored and phy1729 committed Oct 12, 2018
1 parent d6586e2 commit aed99f6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions zsh-syntax-highlighting.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ if true; then
fi
fi

integer zsh_highlight_use_redrawhook
if zle -la .match-bracket; then
(( zsh_highlight_use_redrawhook=1 ))
fi

# -------------------------------------------------------------------------------------------------
# Core highlighting update system
# -------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -357,6 +362,11 @@ _zsh_highlight_bind_widgets()
done
}

if (( $zsh_highlight_use_redrawhook )); then
_zsh_highlight_bind_widgets(){}
zle -N zle-line-pre-redraw _zsh_highlight
fi

# Load highlighters from directory.
#
# Arguments:
Expand Down

0 comments on commit aed99f6

Please sign in to comment.