Skip to content

Commit

Permalink
highlight title
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamuray committed Jun 13, 2011
1 parent 19c3244 commit 133fc17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ and these zstyles to customize styles::

':filter-select:highlight' selected
':filter-select:highlight' matched
':filter-select:highlight' title
':filter-select' max-lines

example:
Expand Down
3 changes: 3 additions & 0 deletions functions/filter-select
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
# available zstyles:
# ':filter-select:highlight' selected
# ':filter-select:highlight' matched
# ':filter-select:highlight' title
# ':filter-select' max-lines
#
# example:
Expand Down Expand Up @@ -116,6 +117,7 @@ function filter-select() {
zstyle -s ':filter-select:highlight' selected hi_selected || hi_selected='standout'
zstyle -s ':filter-select:highlight' matched hi_matched || hi_matched='fg=magenta,underline'
zstyle -s ':filter-select:highlight' marked hi_marked || hi_marked='fg=blue,standout'
zstyle -s ':filter-select:highlight' title hi_title || hi_title='bold'

integer max_lines
zstyle -s ':filter-select' max-lines max_lines || max_lines=0
Expand Down Expand Up @@ -392,6 +394,7 @@ function filter-select() {
POSTDISPLAY=$'\n'
if [[ -n "${title}" ]]; then
POSTDISPLAY+="${title}"$'\n'
region_highlight+="${#BUFFER} $(( $#BUFFER + $#title + 1 )) ${hi_title}"
fi

if (( ${#displays} == 0 )); then
Expand Down

0 comments on commit 133fc17

Please sign in to comment.