'main': Allow newlines in command position.
Fixes #501. Fixes #616 (the original form; not the form in test-data/alias-comment1.zsh which is now considered o be #677 (see previous commit for details)). Fixes a latent bug in test-data/always2.zsh. No user-visible effect, and therefore, no changelog entry.
This commit is contained in:
@@ -747,10 +747,12 @@ _zsh_highlight_main_highlighter_highlight_list()
|
||||
(*) style=unknown-token;;
|
||||
esac
|
||||
elif [[ $this_word == *':regular:'* ]]; then
|
||||
# This highlights empty commands (semicolon follows nothing) as an error.
|
||||
# Zsh accepts them, though.
|
||||
style=commandseparator
|
||||
elif [[ $this_word == *':start:'* ]] && [[ $arg == $'\n' ]]; then
|
||||
style=commandseparator
|
||||
else
|
||||
# This highlights empty commands (semicolon follows nothing) as an error.
|
||||
# Zsh accepts them, though.
|
||||
style=unknown-token
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user