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
					
				|  | @ -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…
	
		Reference in New Issue