From d16ec1198b5d178219ecb94c67e684c606f2aad5 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sun, 23 Oct 2016 20:09:46 +1300 Subject: [PATCH] Don't consider file as valid if its window is in diff mode --- autoload/tagbar.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 00af56b..f1de207 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -4024,6 +4024,12 @@ function! s:IsValidFile(fname, ftype) abort return 0 endif + let winnr = bufwinnr(a:fname) + if winnr != -1 && getwinvar(winnr, '&diff') + call s:debug('Window is in diff mode') + return 0 + endif + if &previewwindow call s:debug('In preview window') return 0