mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
cursor: Remove cursor highlighting when accepting a line.
Fixes zsh-users/zsh-syntax-highlighting#109.
Similar to 59fbdda64c in the 'main' highlighter.
This commit is contained in:
parent
96ee5116b1
commit
4f0c293fde
1 changed files with 5 additions and 1 deletions
|
|
@ -34,11 +34,15 @@
|
|||
# Whether the cursor highlighter should be called or not.
|
||||
_zsh_highlight_cursor_highlighter_predicate()
|
||||
{
|
||||
# accept-* may trigger removal of cursor highlighting
|
||||
[[ $WIDGET == accept-* ]] ||
|
||||
_zsh_highlight_cursor_moved
|
||||
}
|
||||
|
||||
# Cursor highlighting function.
|
||||
_zsh_highlight_cursor_highlighter()
|
||||
{
|
||||
[[ $WIDGET == accept-* ]] && return
|
||||
|
||||
region_highlight+=("$CURSOR $(( $CURSOR + 1 )) $ZSH_HIGHLIGHT_STYLES[cursor]")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue