File tree 4 files changed +19
-12
lines changed
4 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ augroup END
8
8
9
9
augroup UltestOutputMappings
10
10
autocmd !
11
- autocmd FileType UltestOutput tnoremap <buffer> q <C-\><C-N><C-W><C-K >
12
- autocmd FileType UltestOutput nnoremap <buffer> q <C-W><C-K >
11
+ autocmd FileType UltestOutput tnoremap <buffer> q <C-\><C-N><C-W><C-P >
12
+ autocmd FileType UltestOutput nnoremap <buffer> q <C-W><C-P >
13
13
augroup END
14
14
15
15
function ! ultest#output#open (test) abort
Original file line number Diff line number Diff line change @@ -45,11 +45,15 @@ function! ultest#summary#close() abort
45
45
endif
46
46
endfunction
47
47
48
- function ! ultest#summary#toggle () abort
48
+ function ! ultest#summary#toggle (jump ) abort
49
49
if s: IsOpen ()
50
50
call ultest#summary#close ()
51
51
else
52
- call ultest#summary#open ()
52
+ if a: jump
53
+ call ultest#summary#jumpto ()
54
+ else
55
+ call ultest#summary#open ()
56
+ end
53
57
endif
54
58
endfunction
55
59
Original file line number Diff line number Diff line change @@ -235,11 +235,12 @@ COMMANDS *ultest-commands*
235
235
:UltestStopNearest *:UltestStopNearest*
236
236
Stop any running jobs and results for the nearest position
237
237
238
- :UltestSummary *:UltestSummary*
239
- Toggle the summary window between open and closed
238
+ :UltestSummary[!] *:UltestSummary*
239
+ Toggle the summary window between open and closed If [!] is given, jump to
240
+ the window if opened
240
241
241
- :UltestSummaryOpen *:UltestSummaryOpen*
242
- Open the summary window
242
+ :UltestSummaryOpen[!] *:UltestSummaryOpen*
243
+ Open the summary window If [!] is given, jump to the window
243
244
244
245
:UltestSummaryClose *:UltestSummaryClose*
245
246
Close the summary window
Original file line number Diff line number Diff line change @@ -332,12 +332,14 @@ command! UltestStop call ultest#stop_file()
332
332
command ! UltestStopNearest call ultest#stop_nearest ()
333
333
334
334
" "
335
- " Toggle the summary window between open and closed
336
- command ! UltestSummary call ultest#summary#toggle ()
335
+ " Toggle the summary window between open and closed.
336
+ " If [!] is given, jump to the window if opened
337
+ command ! - bang UltestSummary call ultest#summary#toggle (expand (" <bang>" ) == " !" )
337
338
338
339
" "
339
- " Open the summary window
340
- command ! UltestSummaryOpen call ultest#summary#open ()
340
+ " Open the summary window.
341
+ " If [!] is given, jump to the window
342
+ command ! - bang UltestSummaryOpen call ultest#summary#open (expand (" <bang>" ) == " !" )
341
343
342
344
" "
343
345
" Close the summary window
You can’t perform that action at this time.
0 commit comments