File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,17 @@ function! s:create_grep_options(word) abort
50
50
endfunction
51
51
52
52
53
+ function ! s: show_result () abort
54
+ let results = getqflist ()
55
+ call codequery#query#prettify_qf_layout_and_map_keys (results)
56
+ if ! empty (results)
57
+ echom ' Found ' . len (results) . ' result' . (len (results) > 1 ? ' s' : ' ' )
58
+ else
59
+ echom ' Result Not Found'
60
+ endif
61
+ endfunction
62
+
63
+
53
64
54
65
" =============================================================================
55
66
" Entries
@@ -193,14 +204,7 @@ function! codequery#query#do_query(word) abort
193
204
let &l: grepprg = grepprg . ' \| awk "{ sub(/.*\/\.\//,x) }1"'
194
205
silent execute grepcmd
195
206
redraw !
196
-
197
- let results = getqflist ()
198
- call codequery#query#prettify_qf_layout_and_map_keys (results)
199
- if ! empty (results)
200
- echom ' Found ' . len (results) . ' results'
201
- else
202
- echom ' Result Not Found'
203
- endif
207
+ call s: show_result ()
204
208
finally
205
209
let &l: grepprg = l: grepprg_bak
206
210
let &grepformat = l: grepformat_bak
You can’t perform that action at this time.
0 commit comments