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/config/wrap.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vim/config/wrap.vim') diff --git a/vim/config/wrap.vim b/vim/config/wrap.vim index 8c7829ba..a90c2765 100644 --- a/vim/config/wrap.vim +++ b/vim/config/wrap.vim @@ -30,7 +30,7 @@ if has('linebreak') set showbreak=... " If we have the option, indent wrapped lines as much as the first line - if has('&breakindent') + if exists('+breakindent') set breakindent endif -- cgit v1.2.3