mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2025-02-16 11:08:23 +00:00
Underline current entry (with small problems)
This commit is contained in:
parent
4af4fe9b84
commit
dce576f3d7
1 changed files with 7 additions and 1 deletions
|
@ -91,6 +91,12 @@ _hsmw_main() {
|
|||
entry[1]='>'
|
||||
disp_list[on_page_idx]="$entry"
|
||||
|
||||
#
|
||||
# Detect where "> .." entry starts
|
||||
#
|
||||
|
||||
local txt_before="${(F)${(@)disp_list[1,on_page_idx-1]}}"
|
||||
|
||||
#
|
||||
# Colorify
|
||||
#
|
||||
|
@ -101,7 +107,7 @@ _hsmw_main() {
|
|||
|
||||
POSTDISPLAY="$preamble$text"
|
||||
|
||||
region_highlight=()
|
||||
region_highlight=( "$(( offset + ${#txt_before} )) $(( offset + ${#txt_before} + ${#entry} + 1 )) underline" )
|
||||
if [ -n "$colsearch_pattern" ]; then
|
||||
region_highlight+=( "${(f)${(S)text//*(#bi)(${~colsearch_pattern})/$(( offset + mbegin[1] - 1 )) $(( offset + mend[1] )) fg=magenta,bold${nl}}%$nl*}" )
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue