Skip to content

Commit 5fec40a

Browse files
committed
When b:sy is present, only disable Sy if the file disappears
In mhinz#344, we disable Sy if any condition in s:skip() is true. This is too aggressive. If b:sy was already set then we should prefer to leave it set, except when we can't access the file anymore. Therefore, stop using s:skip() to handle this condition and simply check filereadable(). Closes mhinz#347
1 parent c3d450e commit 5fec40a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/sy.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function! sy#start(...) abort
4242
return
4343
else
4444
let path = s:get_path(bufnr)
45-
if s:skip(bufnr, path)
45+
if !filereadable(path)
4646
call sy#stop()
4747
return
4848
elseif empty(sy.vcs)

0 commit comments

Comments
 (0)