Merge 3a0ad239db into 9523d6d49c
				
					
				
			This commit is contained in:
		
						commit
						b3f032c9a7
					
				| 
						 | 
					@ -53,6 +53,9 @@ fi
 | 
				
			||||||
# Core highlighting update system
 | 
					# Core highlighting update system
 | 
				
			||||||
# -------------------------------------------------------------------------------------------------
 | 
					# -------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Load datetime Zsh module for measuring time delta between keystrokes
 | 
				
			||||||
 | 
					zmodload zsh/datetime
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Array declaring active highlighters names.
 | 
					# Array declaring active highlighters names.
 | 
				
			||||||
typeset -ga ZSH_HIGHLIGHT_HIGHLIGHTERS
 | 
					typeset -ga ZSH_HIGHLIGHT_HIGHLIGHTERS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -83,6 +86,11 @@ _zsh_highlight()
 | 
				
			||||||
  # Do not highlight if there are pending inputs (copy/paste).
 | 
					  # Do not highlight if there are pending inputs (copy/paste).
 | 
				
			||||||
  [[ $PENDING -gt 0 ]] && return $ret
 | 
					  [[ $PENDING -gt 0 ]] && return $ret
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Do not highlight if the time delta from previous keystroke is less than 200 ms
 | 
				
			||||||
 | 
					  [[ -z "$LAST_INVOKE_EPOCH" ]] && typeset -g LAST_INVOKE_EPOCH=$EPOCHREALTIME
 | 
				
			||||||
 | 
					  [[ $(( $EPOCHREALTIME - $LAST_INVOKE_EPOCH )) -lt 0.2 ]] && return $ret
 | 
				
			||||||
 | 
					  typeset -g LAST_INVOKE_EPOCH=$EPOCHREALTIME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Reset region highlight to build it from scratch
 | 
					  # Reset region highlight to build it from scratch
 | 
				
			||||||
  typeset -ga region_highlight
 | 
					  typeset -ga region_highlight
 | 
				
			||||||
  region_highlight=();
 | 
					  region_highlight=();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue