mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-24 20:33:04 +00:00
Underline of current element no longer lacking from matched text
This commit is contained in:
parent
25d593ec29
commit
c70a807b25
1 changed files with 2 additions and 1 deletions
|
@ -138,12 +138,13 @@ _hsmw_main() {
|
|||
done
|
||||
fi
|
||||
|
||||
region_highlight+=( "$(( offset + ${#txt_before} )) $(( offset + ${#txt_before} + ${#entry} + 1 )) underline" )
|
||||
if [ -n "$colsearch_pattern" ]; then
|
||||
local nl=$'\n'
|
||||
# Following line is taken from Zaw (GH zsh-users/zaw) – license is named "Zaw", it is in LICENSE file
|
||||
region_highlight+=( "${(f)${(S)text//*(#bi)(${~colsearch_pattern})/$(( offset + mbegin[1] - 1 )) $(( offset + mend[1] )) ${__hsmw_hl_color}${nl}}%$nl*}" )
|
||||
fi
|
||||
|
||||
region_highlight+=( "$(( offset + ${#txt_before} )) $(( offset + ${#txt_before} + ${#entry} + 1 )) underline" )
|
||||
}
|
||||
|
||||
[[ "$__HSMW_MH_SOURCED" != "1" ]] && source "$HSMW_REPO_DIR/hsmw-highlight"
|
||||
|
|
Loading…
Reference in a new issue