Fix regression: Highlight ';' as commandseparator.

This was broken by c2b9327b07
and tracked as zsh-users/zsh-syntax-highlighting#199.

This fixes the vanilla-newline.zsh test, which was was (consciously) broken
by the previous commit.
This commit is contained in:
Daniel Shahaf
2015-09-17 22:45:22 +00:00
parent aab1b8f50f
commit 5fb4cb2f72
2 changed files with 40 additions and 2 deletions

View File

@@ -120,8 +120,8 @@ _zsh_highlight_main_highlighter()
# words for arguments).
local needle=$'[;\n]'
integer offset=${${buf[start_pos+1,-1]}[(i)$needle]}
(( start_pos += offset ))
(( end_pos += offset ))
(( start_pos += offset - 1 ))
(( end_pos = start_pos + $#arg ))
else
((start_pos+=${#buf[$start_pos+1,-1]}-${#${buf[$start_pos+1,-1]##([[:space:]]|\\[[:space:]])#}}))
((end_pos=$start_pos+${#arg}))