Skip to content

Commit 46d78f2

Browse files
committed
Introduce highlight group "GrepperPrompt"
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.
1 parent 6faee48 commit 46d78f2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/grepper.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ COLORS *grepper-colors*
521521

522522
Prompt:~
523523

524-
Default highlight group: |hl-Question|
524+
Default highlight group: GrepperPrompt linked to |hl-Question|.
525525
>
526-
highlight Question ctermfg=160 guifg=#ff0000 cterm=NONE
526+
highlight GrepperPrompt ctermfg=160 guifg=#ff0000 cterm=NONE
527527
>
528528
Error messages:~
529529

plugin/grepper.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
" Escaping test line:
44
" ..ad\\f40+$':-# @=,!;%^&&*()_{}/ /4304\'""?`9$343%$ ^adfadf[ad)[(
55

6+
highlight default link GrepperPrompt Question
7+
68
"
79
" Default values that get used for missing values in g:grepper.
810
"
@@ -644,7 +646,7 @@ function! s:prompt(flags)
644646
" 'cr': start searching
645647
let s:prompt_op = 'cancelled'
646648

647-
echohl Question
649+
echohl GrepperPrompt
648650
call inputsave()
649651

650652
try

0 commit comments

Comments
 (0)