Skip to content

Commit

Permalink
Introduce highlight group "GrepperPrompt"
Browse files Browse the repository at this point in the history
Previously one had to change Question to change the colors for the prompt.

Now GrepperPrompt is used instead. It's linked to Question by default, so users
won't notice the change.

This allows to change the colors for the prompt without touching Question.
  • Loading branch information
mhinz committed Mar 6, 2018
1 parent 6faee48 commit 46d78f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions doc/grepper.txt
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ COLORS *grepper-colors*

Prompt:~

Default highlight group: |hl-Question|
Default highlight group: GrepperPrompt linked to |hl-Question|.
>
highlight Question ctermfg=160 guifg=#ff0000 cterm=NONE
highlight GrepperPrompt ctermfg=160 guifg=#ff0000 cterm=NONE
>
Error messages:~

Expand Down
4 changes: 3 additions & 1 deletion plugin/grepper.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
" Escaping test line:
" ..ad\\f40+$':-# @=,!;%^&&*()_{}/ /4304\'""?`9$343%$ ^adfadf[ad)[(

highlight default link GrepperPrompt Question

"
" Default values that get used for missing values in g:grepper.
"
Expand Down Expand Up @@ -644,7 +646,7 @@ function! s:prompt(flags)
" 'cr': start searching
let s:prompt_op = 'cancelled'

echohl Question
echohl GrepperPrompt
call inputsave()

try
Expand Down

0 comments on commit 46d78f2

Please sign in to comment.