Skip to content
Merged
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
17 changes: 4 additions & 13 deletions ftplugin/python/coveragepy.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ let g:coveragepy_last_session = ""
let g:coveragepy_marks = []
let g:coveragepy_session_map = {}
let g:coveragepy_executable = ""
let s:sign_id = 9423


function! s:ToggleSigns()
Expand Down Expand Up @@ -87,16 +86,8 @@ endfunction


function! s:ClearSigns() abort
let placements = split(execute('sign place file=' . bufname('%')), '\n')
let fname = bufname('%')
for s in placements
let cols = split(s)
let name = split(cols[-1], '=')[-1]
if name[0:8] ==# 'uncovered'
let id = s:sign_id
exe printf('sign unplace %d file=%s', id, fname)
endif
endfor
execute("sign unplace * group=uncovered buffer=".bufnr('%'))
execute("sign unplace * group=branchuncovered buffer=".bufnr('%'))
endfunction


Expand Down Expand Up @@ -129,10 +120,10 @@ function! s:HighlightMissing() abort
for path in keys(g:coveragepy_session_map)
if (current_buffer =~ path) || (current_buffer_py =~ path)
for position in g:coveragepy_session_map[path]
execute(":sign place ". s:sign_id ." line=". position ." name=uncovered buffer=".bufnr("%"))
execute(":sign place ". position ." line=". position ." group=uncovered name=uncovered buffer=".bufnr("%"))
endfor
for position in g:coveragepy_session_map['BRANCH' . path]
execute(":sign place ". s:sign_id ." line=". position ." name=branchuncovered buffer=".bufnr("%"))
execute(":sign place ". position ." line=". position ." group=branchuncovered name=branchuncovered buffer=".bufnr("%"))
endfor
" FIXME: I had to comment this out because it was no longer correct
" after adding branch support
Expand Down