Skip to content

Commit 9cafe15

Browse files
committed
Add option not to automatically open testrunner
1 parent bf87b58 commit 9cafe15

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

autoload/OmniSharp/testrunner.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ function! OmniSharp#testrunner#SetTests(bufferTests) abort
391391
let test.lnum = buffertest.nameRange.Start.Line
392392
endfor
393393
endfor
394+
if !get(g:, 'OmniSharp_testrunner', 1) | return | endif
394395
let winid = win_getid()
395396
if hasNew
396397
call s:Open()
@@ -439,6 +440,7 @@ function! s:UpdateState(bufnr, state, ...) abort
439440
let test.stacktrace = stacktrace
440441
let test.output = get(opts, 'output', [])
441442

443+
if !has_key(s:runner, 'bufnr') | continue | endif
442444
call setbufvar(s:runner.bufnr, '&modifiable', 1)
443445
let lines = getbufline(s:runner.bufnr, 1, '$')
444446
let pattern = '^ ' . substitute(filename, '/', '\\/', 'g')
@@ -460,6 +462,7 @@ function! s:UpdateState(bufnr, state, ...) abort
460462
call setbufvar(s:runner.bufnr, '&modified', 0)
461463
endif
462464
endfor
465+
if !get(g:, 'OmniSharp_testrunner', 1) | return | endif
463466
let winid = win_getid()
464467
if s:buffer.focus()
465468
syn sync fromstart

doc/omnisharp-vim.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,10 @@ failed test locations point to the failed assertion; successful test locations
400400
point to the test method declaration.
401401
Default: 0
402402

403+
*g:OmniSharp_testrunner*
404+
Open the |omnisharp-testrunner| automatically when running tests.
405+
Default: 1
406+
403407
-------------------------------------------------------------------------------
404408
3.6 INTEGRATIONS *omnisharp-integration-options*
405409

0 commit comments

Comments
 (0)