mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-22 03:13:09 +00:00
*highlight: Better indexing detection in variables – use [^\]]
This commit is contained in:
parent
ab439966ee
commit
331df45fa7
1 changed files with 1 additions and 1 deletions
|
@ -669,7 +669,7 @@ typeset -gA HSMW_HIGHLIGHT_STYLES
|
|||
local mybuf="$arg"
|
||||
integer idx=start_pos end_idx
|
||||
|
||||
while [[ "$mybuf" = (#b)[^\$\\]#((\$[a-zA-Z0-9_]##(\[[^[:space:]]#\])(#c0,1))|(\$[{](\([a-zA-Z0@%#]##\))(#c0,1)[a-zA-Z0-9_]##(\[[^[:space:]]#\])(#c0,1)[}])|[\\][\'\"\$]|[\\](*))(*) ]]; do
|
||||
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]}"
|
||||
|
|
Loading…
Reference in a new issue