whitespace: do not detect '=======' as conflict marker for rst files
closes #2014
This commit is contained in:
parent
2daef1bcb8
commit
c24f3c7c4d
|
@ -50,7 +50,12 @@ endfunction
|
||||||
function! s:conflict_marker()
|
function! s:conflict_marker()
|
||||||
" Checks for git conflict markers
|
" Checks for git conflict markers
|
||||||
let annotation = '\%([0-9A-Za-z_.:]\+\)\?'
|
let annotation = '\%([0-9A-Za-z_.:]\+\)\?'
|
||||||
let pattern = '^\%(\%(<\{7} '.annotation. '\)\|\%(=\{7\}\)\|\%(>\{7\} '.annotation.'\)\)$'
|
if &ft is# 'rst'
|
||||||
|
" rst filetypes use '=======' as header
|
||||||
|
let pattern = '^\%(\%(<\{7} '.annotation. '\)\|\%(>\{7\} '.annotation.'\)\)$'
|
||||||
|
else
|
||||||
|
let pattern = '^\%(\%(<\{7} '.annotation. '\)\|\%(=\{7\}\)\|\%(>\{7\} '.annotation.'\)\)$'
|
||||||
|
endif
|
||||||
return search(pattern, 'nw')
|
return search(pattern, 'nw')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue