Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions H-S-MW.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ zle -N history-search-multi-word-pforwards history-search-multi-word

[[ ${+termcap[Co]} = 1 && ${termcap[Co]} = 256 ]] && {
zstyle -s ":history-search-multi-word" highlight-color tmp || zstyle ":history-search-multi-word" highlight-color "bg=17"
zstyle -s ":history-search-multi-word" background-color tmp || zstyle ":history-search-multi-word" background-color "bg=22"
typeset -gA HSMW_HIGHLIGHT_STYLES
[[ ${HSMW_HIGHLIGHT_STYLES[variable]} = none ]] && HSMW_HIGHLIGHT_STYLES[variable]="fg=112"
}
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Alternatively, you could use `zle .reset-prompt` (i.e. with the dot in front) to
```zsh
zstyle ":history-search-multi-word" page-size "8" # Number of entries to show (default is $LINES/3)
zstyle ":history-search-multi-word" highlight-color "fg=yellow,bold" # Color in which to highlight matched, searched text (default bg=17 on 256-color terminals)
zstyle ":history-search-multi-word" background-color "bg=22" # Color of the tooltip background in context history (default bg=22 on 256-color terminals)
zstyle ":plugin:history-search-multi-word" synhl "yes" # Whether to perform syntax highlighting (default true)
zstyle ":plugin:history-search-multi-word" active "underline" # Effect on active history entry. Try: standout, bold, bg=blue (default underline)
zstyle ":plugin:history-search-multi-word" check-paths "yes" # Whether to check paths for existence and mark with magenta (default true)
Expand Down
2 changes: 2 additions & 0 deletions functions/history-search-multi-word
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# Zstyles:
# zstyle ":history-search-multi-word" page-size "8"
# zstyle ":history-search-multi-word" highlight-color "fg=yellow,bold"
# zstyle ":history-search-multi-word" background-color "bg=22"
# zstyle ":plugin:history-search-multi-word" synhl "yes"
# zstyle ":plugin:history-search-multi-word" clear-on-cancel "no"

Expand Down Expand Up @@ -62,6 +63,7 @@ _hsmw_main() {
# Read configuration data
zstyle -s ':history-search-multi-word' page-size __hsmw_page_size || __hsmw_page_size=$(( LINES / 3 ))
zstyle -s ':history-search-multi-word' highlight-color __hsmw_hl_color || __hsmw_hl_color="fg=yellow,bold"
zstyle -s ':history-search-multi-word' background-color __hsmw_bg_color || __hsmw_bg_color="bg=22"
zstyle -T ":plugin:history-search-multi-word" synhl && __hsmw_synhl=1 || __hsmw_synhl=0
zstyle -s ":plugin:history-search-multi-word" active __hsmw_active || __hsmw_active="underline"
zstyle -T ":plugin:history-search-multi-word" check-paths && __hsmw_no_check_paths=0 || __hsmw_no_check_paths=1
Expand Down
2 changes: 1 addition & 1 deletion functions/hsmw-context-main
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ text[replace_idx]=">"
integer offset=${#preamble}+${#BUFFER}
POSTDISPLAY="$preamble$text"
if (( page_start_idx != __hsmw_ctx_page_start_idx || offset != __hsmw_ctx_prev_offset )); then
region_highlight=( "${#BUFFER} $offset bg=22" )
region_highlight=( "${#BUFFER} $offset ${__hsmw_bg_color}" )
if (( __hsmw_synhl )); then
integer pre_index=$offset
local line
Expand Down