From d9f940343daacfd547d9000b8664f06908a9b8e4 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 17 May 2019 22:59:56 +0200 Subject: diff-corrections: Don't load if the lambda feature isn't available I wrote the `s:SaveCommentColor()` function using a lambda for `filter()`ing. However, not all Vims have `lambda` support. And it doesn't exist before Vim 7.4 I think. Use this guard to avoid causing errors on startup for those Vims without lambdas. --- bundle/diff-corrections/plugin/diff_corrections.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bundle/diff-corrections/plugin/diff_corrections.vim') diff --git a/bundle/diff-corrections/plugin/diff_corrections.vim b/bundle/diff-corrections/plugin/diff_corrections.vim index fe7f337..2cf3abf 100644 --- a/bundle/diff-corrections/plugin/diff_corrections.vim +++ b/bundle/diff-corrections/plugin/diff_corrections.vim @@ -1,4 +1,4 @@ -if exists('g:loaded_diff_corrections') +if exists('g:loaded_diff_corrections') || !has('lambda') finish endif let g:loaded_diff_corrections = 1 -- cgit v1.2.3