aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2019-05-17 22:59:56 +0200
committerTeddy Wing2019-05-17 22:59:56 +0200
commitd9f940343daacfd547d9000b8664f06908a9b8e4 (patch)
tree576e27aadbff18b9a69be9d34f6d2c043b4e5d80
parentb2f94159f0cd922259847727b917a6271a4b6be3 (diff)
downloaddotvim-d9f940343daacfd547d9000b8664f06908a9b8e4.tar.bz2
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.
-rw-r--r--bundle/diff-corrections/plugin/diff_corrections.vim2
1 files changed, 1 insertions, 1 deletions
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