From a96f1a7dc740aa35b0372f637198586ad70c5366 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 15 Jan 2016 02:04:59 +0100 Subject: [PATCH] Register non-versioned files as inactive --- autoload/sy.vim | 2 ++ doc/signify.txt | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/autoload/sy.vim b/autoload/sy.vim index 20fbdf6..bf6bf7a 100644 --- a/autoload/sy.vim +++ b/autoload/sy.vim @@ -55,6 +55,7 @@ function! sy#start() abort let [ diff, b:sy.type ] = sy#repo#detect() if b:sy.type == 'unknown' + call sy#disable() return endif @@ -80,6 +81,7 @@ function! sy#start() abort let [ diff, b:sy.type ] = sy#repo#detect() if b:sy.type == 'unknown' " no VCS found + call sy#disable() return endif diff --git a/doc/signify.txt b/doc/signify.txt index 76cf384..c6dc764 100644 --- a/doc/signify.txt +++ b/doc/signify.txt @@ -142,7 +142,8 @@ So either the one you set through |g:signify_difftool| or "diff" by default. NOTE: If you don't set this option and Sy is activated, updating signs for a non-VCS file can lead to significant delay since all supported and installed -VCS will be tested for. +VCS will be tested for. (But this also happens only once, afterwards the +buffer is registered as inactive.) ------------------------------------------------------------------------------ *g:signify_vcs_cmds* @@ -316,6 +317,9 @@ COMMAND *signify-commands* < Enable the plugin for the current buffer only. +Can also be used to when a repository was initialized while Sy was already +loaded. + ------------------------------------------------------------------------------ *signify-:SignifyDisable* >