From c24f3c7c4da0932e1a90dc34368b25ce2e3f8f9b Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 10 Dec 2019 16:14:08 +0100 Subject: [PATCH] whitespace: do not detect '=======' as conflict marker for rst files closes #2014 --- autoload/airline/extensions/whitespace.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/whitespace.vim b/autoload/airline/extensions/whitespace.vim index e39265b3..cb917783 100644 --- a/autoload/airline/extensions/whitespace.vim +++ b/autoload/airline/extensions/whitespace.vim @@ -50,7 +50,12 @@ endfunction function! s:conflict_marker() " Checks for git conflict markers 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') endfunction