mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-21 19:03:11 +00:00
*highlight: Simpler code related to offset calculation
This commit is contained in:
parent
586fb6be17
commit
22d839f3bc
1 changed files with 2 additions and 3 deletions
|
@ -313,11 +313,10 @@ typeset -gA HSMW_HIGHLIGHT_STYLES
|
|||
(( start_pos += offset ))
|
||||
(( end_pos = start_pos + $#arg ))
|
||||
else
|
||||
integer offset=0
|
||||
if [[ "$proc_buf" = (#b)(#s)(([[:space:]]|\\[[:space:]])##)* ]]; then
|
||||
# The first, outer parenthesis
|
||||
integer offset="${#match[1]}"
|
||||
else
|
||||
integer offset=0
|
||||
offset="${#match[1]}"
|
||||
fi
|
||||
((start_pos+=offset))
|
||||
((end_pos=$start_pos+${#arg}))
|
||||
|
|
Loading…
Reference in a new issue