mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
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:
parent
aab1b8f50f
commit
5fb4cb2f72
2 changed files with 40 additions and 2 deletions
|
|
@ -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}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue