mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-10 06:14:12 +00:00
*highlight: Fix quoting detection – track backslashing of backslash
This commit is contained in:
parent
32750b665e
commit
8f1d7f3f56
1 changed files with 4 additions and 2 deletions
|
@ -650,8 +650,10 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
|
|||
|
||||
while [[ "$mybuf" = (#b)[^\$\\]#((\$[a-zA-Z0-9_:]##(\[[^\]]#\])(#c0,1))|(\$[{](\([a-zA-Z0@%#]##\))(#c0,1)[a-zA-Z0-9_:#]##(\[[^\]]#\])(#c0,1)[}])|[\\][\'\"\$]|[\\](*))(*) ]]; do
|
||||
[[ -n "${match[7]}" ]] && {
|
||||
idx+=${mbegin[1]}
|
||||
mybuf="${match[7]}"
|
||||
# Skip following char – it is quoted. Choice is
|
||||
# made to not highlight such quoting
|
||||
idx+=${mbegin[1]}+1
|
||||
mybuf="${match[7]:1}"
|
||||
} || {
|
||||
idx+=${mbegin[1]}-1
|
||||
end_idx=idx+${mend[1]}-${mbegin[1]}+1
|
||||
|
|
Loading…
Reference in a new issue