mirror of
https://github.com/zsh-users/zsh-syntax-highlighting
synced 2024-12-12 22:44:35 +00:00
* added a workaround to start highlighting immediately after the creation of a new command line.
This commit is contained in:
parent
ef4f5ed638
commit
56801a6b42
@ -172,3 +172,15 @@ unset highlighter highlighter_dir highlighters_dir
|
|||||||
|
|
||||||
# Initialize the array of active highlighters if needed.
|
# Initialize the array of active highlighters if needed.
|
||||||
[[ $#ZSH_HIGHLIGHT_HIGHLIGHTERS -eq 0 ]] && ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)
|
[[ $#ZSH_HIGHLIGHT_HIGHLIGHTERS -eq 0 ]] && ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)
|
||||||
|
|
||||||
|
# workaround to start highlighting immediately after the creation of a new command line.
|
||||||
|
if [[ $#functions[zle-line-init] -eq 0 ]]; then
|
||||||
|
_zsh_highlight_old_zle_line_init_definition=$functions[zle-line-init]
|
||||||
|
|
||||||
|
function zle-line-init() {
|
||||||
|
eval $_zsh_highlight_old_zle_line_init_definition
|
||||||
|
_zsh_highlight
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
zle -N zle-line-init
|
||||||
|
Loading…
Reference in New Issue
Block a user