瀏覽代碼

changed signs and fix split on multiple lines

bmallred 11 年之前
父節點
當前提交
14efb72108
共有 1 個文件被更改,包括 12 次插入6 次删除
  1. 12 6
      plugin/umbrella.vim

+ 12 - 6
plugin/umbrella.vim

@ -12,9 +12,9 @@ highlight UmbrellaPartial ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow
12 12
highlight UmbrellaNone ctermfg=15 ctermbg=1 guifg=White guibg=Red
13 13
14 14
" Declare signs.
15
sign define UmbrellaCovered text==] texthl=UmbrellaCovered
16
sign define UmbrellaPartial text==| texthl=UmbrellaPartial
17
sign define UmbrellaNone text==[ texthl=UmbrellaNone
15
sign define UmbrellaCovered text=°° texthl=UmbrellaCovered
16
sign define UmbrellaPartial text=÷÷ texthl=UmbrellaPartial
17
sign define UmbrellaNone text=×× texthl=UmbrellaNone
18 18
19 19
function! s:Initialize()
20 20
    let s:coverage_systems = {
@ -85,15 +85,21 @@ function! s:ShowCoverage()
85 85
86 86
            if bufexists(l:parts[0])
87 87
                if len(l:parts[1])
88
                    exe ":sign place 1 line=" . l:parts[1] . " name=UmbrellaCovered file=" . l:parts[0]
88
                    for n in split(l:parts[1], ",")
89
                        exe ":sign place 1 line=" . l:n . " name=UmbrellaCovered file=" . l:parts[0]
90
                    endfor
89 91
                endif
90 92
91 93
                if len(l:parts[2])
92
                    exe ":sign place 1 line=" . l:parts[2] . " name=UmbrellaPartial file=" . l:parts[0]
94
                    for n in split(l:parts[2], ",")
95
                        exe ":sign place 1 line=" . l:n . " name=UmbrellaPartial file=" . l:parts[0]
96
                    endfor
93 97
                endif
94 98
95 99
                if len(l:parts[3])
96
                    exe ":sign place 1 line=" . l:parts[3] . " name=UmbrellaNone file=" . l:parts[0]
100
                    for n in split(l:parts[3], ",")
101
                        exe ":sign place 1 line=" . l:n . " name=UmbrellaNone file=" . l:parts[0]
102
                    endfor
97 103
                endif
98 104
            endif
99 105
        endfor