blob: 170cc2d0f7993611faafe08e88378cba89453c1a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
" Choose the color column depending on non-comment line count
function! gitcommit#CursorColumn() abort
" If we can find a line after the first that isn't a comment, we're
" composing the message
for l:num in range(1, line('$'))
if l:num == 1
continue
endif
let l:line = getline(l:num)
if strpart(l:line, 0, 1) !=# '#'
return '+1'
elseif l:line =~# '^# -\{24} >8 -\{24}$'
break
endif
endfor
" Otherwise, we're still composing our subject
return '51'
endfunction
|