whitespace: do not detect '=======' as conflict marker for rst files

closes #2014
This commit is contained in:
Christian Brabandt 2019-12-10 16:14:08 +01:00
parent 2daef1bcb8
commit c24f3c7c4d
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -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