Skip to content

Commit cbd13c4

Browse files
committed
Add :OmniSharpTestRunnerReset command
1 parent edf663a commit cbd13c4

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

autoload/OmniSharp/actions/test.vim

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ function! s:debug.process.closed(...) abort
110110
endfunction
111111

112112

113+
function! OmniSharp#actions#test#Reset() abort
114+
let s:run.running = 0
115+
endfunction
116+
117+
113118
function! OmniSharp#actions#test#Run(nobuild, ...) abort
114119
if !s:utils.capabilities() | return | endif
115120
if !s:utils.isrunning() | return | endif

autoload/OmniSharp/testrunner.vim

+9
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,15 @@ function! s:buffer.repainttest(filename, testname, test) abort
421421
endfunction
422422

423423

424+
function! OmniSharp#testrunner#Reset() abort
425+
let s:current = {}
426+
let s:runner = {}
427+
let s:tests = {}
428+
call OmniSharp#actions#test#Reset()
429+
call s:Open()
430+
endfunction
431+
432+
424433
function! OmniSharp#testrunner#SetBreakpoints() abort
425434
if !OmniSharp#util#HasVimspector()
426435
return s:utils.log.warn('Vimspector required to set breakpoints')

plugin/OmniSharp.vim

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ let g:omnicomplete_fetch_full_documentation = get(g:, 'omnicomplete_fetch_full_d
5454

5555
command! -bar -nargs=? OmniSharpInstall call OmniSharp#Install(<f-args>)
5656
command! -bar -nargs=? OmniSharpOpenLog call OmniSharp#log#Open(<q-args>)
57-
command! -bar -nargs=? OmniSharpOpenTestRunner call OmniSharp#testrunner#Open()
5857
command! -bar -bang OmniSharpStatus call OmniSharp#Status(<bang>0)
58+
command! -bar OmniSharpTestRunner call OmniSharp#testrunner#Open()
59+
command! -bar OmniSharpTestRunnerReset call OmniSharp#testrunner#Reset()
5960

6061
" Preserve backwards compatibility with older version g:OmniSharp_highlight_types
6162
let g:OmniSharp_highlighting = get(g:, 'OmniSharp_highlighting', get(g:, 'OmniSharp_highlight_types', 2))

0 commit comments

Comments
 (0)