whitespace: fix small problems from conflicts test

This commit is contained in:
Christian Brabandt 2019-04-26 22:08:26 +02:00
parent 1fedd3a2b7
commit 28ed36a9ec
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -51,8 +51,7 @@ function! s:conflict_marker()
" Checks for git conflict markers
let annotation = '\%([0-9A-Za-z_.:]\+\)\?'
let pattern = '^\%(\%(<\{7} '.annotation. '\)\|\%(=\{7\}\)\|\%(>\{7\} '.annotation.'\)\)$'
let result = search(pattern, 'nw')
return result
return search(pattern, 'nw')
endfunction
function! airline#extensions#whitespace#check()
@ -128,7 +127,7 @@ function! airline#extensions#whitespace#check()
let mixed_indent_file_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_file_format', '[%s]mix-indent-file')
let b:airline_whitespace_check .= space.printf(mixed_indent_file_fmt, mixed_file)
endif
if !empty(conflicts)
if conflicts != 0
let conflicts_fmt = get(g:, 'airline#extensions#whitespace#conflicts_format', '[%s]conflicts')
let b:airline_whitespace_check .= space.printf(conflicts_fmt, conflicts)
endif