Skip to content

Commit 3a12df5

Browse files
committed
feat(summary): custom open command
See #67
1 parent a4609d7 commit 3a12df5

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Diff for: autoload/ultest/summary.vim

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ function! ultest#summary#render(test) abort
6060
endfunction
6161

6262
function! s:OpenNewWindow() abort
63-
exec "botright vnew ".s:buffer_name." | vertical resize ".g:ultest_summary_width
63+
exec g:ultest_summary_open
64+
exec "edit ".s:buffer_name
6465
let buf_settings = {
6566
\ "buftype": "nofile",
6667
\ "bufhidden": "hide",

Diff for: doc/ultest.txt

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ Virtual text for passing tests (string) (default: g:ultest_icons?
127127
*g:ultest_summary_width*
128128
Width of the summary window (default: 50)
129129

130+
*g:ultest_summary_open*
131+
Command to open the summary window. (default: "botright vsplit | vertical
132+
resize ".g:ultest_summary_width)
133+
130134
*g:ultest_pre_run*
131135
A function name to call before running any tests in a file. Receives the
132136
relative file path as an argument.

Diff for: plugin/ultest.vim

+5
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ let g:ultest_running_text = get(g:, "ultest_running_text", g:ultest_icons? "●"
174174
" (default: 50)
175175
let g:ultest_summary_width = get(g:, "ultest_summary_width", 50)
176176

177+
""
178+
" Command to open the summary window.
179+
" (default: "botright vsplit | vertical resize ".g:ultest_summary_width)
180+
let g:ultest_summary_open = get(g:, "ultest_summary_open", "botright vsplit | vertical resize ".g:ultest_summary_width)
181+
177182
""
178183
" A function name to call before running any tests in a file.
179184
" Receives the relative file path as an argument.

0 commit comments

Comments
 (0)