mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
back-dollar-quoted-argument: Correct an off-by-one.
Highlight the last character of a «\xHH» escape when it is the last thing in
LBUFFER. This is similar to what b0cc02ed86 did
for issue #186.
This commit is contained in:
parent
0788514cbd
commit
6732783d46
3 changed files with 41 additions and 1 deletions
|
|
@ -311,7 +311,7 @@ _zsh_highlight_main_highlighter_highlight_dollar_string()
|
|||
(( k = j + 1 ))
|
||||
case "$arg[$i]" in
|
||||
"\\") style=$ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]
|
||||
for (( c = i + 1 ; c < end_pos - start_pos ; c += 1 )); do
|
||||
for (( c = i + 1 ; c <= end_pos - start_pos ; c += 1 )); do
|
||||
[[ "$arg[$c]" != ([0-9xXuUa-fA-F]) ]] && break
|
||||
done
|
||||
AA=$arg[$i+1,$c-1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue