From 8b79ec9365491f8fb2bd48452b6aca68d2b673d2 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 10 Nov 2017 21:54:42 +1300 Subject: Use exists+ test rather than exists& From :help hidden-options: >Not all options are supported in all versions. This depends on the >supported features and sometimes on the system. A remark about this is >in curly braces below. When an option is not supported it may still be >set without getting an error, this is called a hidden option. You can't >get the value of a hidden option though, it is not stored. > >To test if option "foo" can be used with ":set" use something like this: > if exists('&foo') >This also returns true for a hidden option. To test if option "foo" is >really supported use something like this: > if exists('+foo') --- vim/plugin/big_file_options.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vim/plugin/big_file_options.vim') diff --git a/vim/plugin/big_file_options.vim b/vim/plugin/big_file_options.vim index bbbedc96..cdced67d 100644 --- a/vim/plugin/big_file_options.vim +++ b/vim/plugin/big_file_options.vim @@ -44,7 +44,7 @@ function! s:BigFileOptions() endif " Limit the number of columns of syntax highlighting - if exists('&synmaxcol') + if exists('+synmaxcol') \ && &synmaxcol > g:big_file_synmaxcol execute 'setlocal synmaxcol=' . g:big_file_synmaxcol endif -- cgit v1.2.3