main: alias style overrides precommand style
This commit is contained in:
		
							parent
							
								
									c138123397
								
							
						
					
					
						commit
						e3edddd8ec
					
				|  | @ -650,7 +650,7 @@ _zsh_highlight_main_highlighter_highlight_list() | ||||||
|      next_word=':start:' |      next_word=':start:' | ||||||
|    elif [[ $this_word == *':start:'* ]] && (( in_redirection == 0 )); then # $arg is the command word |    elif [[ $this_word == *':start:'* ]] && (( in_redirection == 0 )); then # $arg is the command word | ||||||
|      if (( ${+precommand_options[$arg]} )) && _zsh_highlight_main__is_runnable $arg; then |      if (( ${+precommand_options[$arg]} )) && _zsh_highlight_main__is_runnable $arg; then | ||||||
|       style=precommand |       [[ $res != alias ]] && style=precommand | ||||||
|       flags_with_argument=${precommand_options[$arg]%:*} |       flags_with_argument=${precommand_options[$arg]%:*} | ||||||
|       flags_sans_argument=${precommand_options[$arg]#*:} |       flags_sans_argument=${precommand_options[$arg]#*:} | ||||||
|       next_word=${next_word//:regular:/} |       next_word=${next_word//:regular:/} | ||||||
|  |  | ||||||
|  | @ -31,6 +31,6 @@ alias x=command | ||||||
| BUFFER='x ls' | BUFFER='x ls' | ||||||
| 
 | 
 | ||||||
| expected_region_highlight=( | expected_region_highlight=( | ||||||
|   "1 1 precommand" # x |   "1 1 alias" # x | ||||||
|   "3 4 command" # ls |   "3 4 command" # ls | ||||||
| ) | ) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue