Skip to content

Remove coverage#ShowDiff #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions autoload/coverage.vim
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,6 @@ function! s:CoverageShow(...) abort
endif
endfunction

""
" Shows coverage in vimdiff with the version coverage was known for.
function! s:CoverageShowDiff() abort
let l:filename = expand('%:p')
if has_key(s:cache, l:filename)
let l:data = s:cache[l:filename]
if has_key(l:data, 'diff_path')
" Current file has changed, so split into diff mode with the file at the
" point where the coverage is known, and render it there, in the split.
execute 'vertical' 'diffsplit' l:data.diff_path
call s:RenderFromCache(l:filename)
else
call maktaba#error#Warn('There is no diff.')
endif
endif
endfunction


""
" Calculates coverage stats from @dict(s:cache), and returns the stats for the
" requested {filename}. Does not get the coverage stats.
Expand Down Expand Up @@ -246,9 +228,7 @@ function! coverage#CacheAndShow(filename, coverage) abort
return
endif
let s:cache[a:filename] = a:coverage
if !has_key(a:coverage, 'diff_path')
call s:RenderFromCache(a:filename)
endif
call s:RenderFromCache(a:filename)
endfunction

"}}}
Expand All @@ -271,14 +251,6 @@ function! coverage#Show(...) abort
endtry
endfunction

function! coverage#ShowDiff() abort
try
call s:CoverageShowDiff()
catch /ERROR.*/
call maktaba#error#Shout('Error rendering coverage: %s', v:exception)
endtry
endfunction

function! coverage#Hide() abort
try
if has_key(s:visible, expand('%:p'))
Expand Down
3 changes: 0 additions & 3 deletions doc/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ This will render coverage for all mentioned filetypes, if available.
:CoverageToggle *:CoverageToggle*
Toggle coverage report.

:CoverageShowDiff *:CoverageShowDiff*
Show coverage report when the file changed, using vimdiff.

:CoverageHide *:CoverageHide*
Hide coverage report.

Expand Down
4 changes: 0 additions & 4 deletions plugin/commands.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ command -nargs=* -complete=customlist,coverage#CompletionList CoverageShow
" Toggle coverage report.
command -nargs=0 CoverageToggle call coverage#Toggle()

""
" Show coverage report when the file changed, using vimdiff.
command -nargs=0 CoverageShowDiff call coverage#ShowDiff()

""
" Hide coverage report.
command -nargs=0 CoverageHide call coverage#Hide()
Expand Down