From c70a807b2503cf54b8b84d7ca215a346df2e9e21 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sat, 22 Oct 2016 11:37:02 +0200 Subject: [PATCH] Underline of current element no longer lacking from matched text --- history-search-multi-word | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/history-search-multi-word b/history-search-multi-word index 1df0014..8acd586 100644 --- a/history-search-multi-word +++ b/history-search-multi-word @@ -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"