diff options
author | James McCoy <jamessan@jamessan.com> | 2019-06-24 12:08:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-24 12:08:57 -0400 |
commit | 8c7e41f596e60031099c36c915a3f610b893d60e (patch) | |
tree | fe0fe669049839b8a70f59878e0ee4152e1a3c7a /src/nvim/option.c | |
parent | 8d4a655ace746c9ad5050b2c37dc5133dcb74fc4 (diff) | |
parent | 6cb44602075ccfe045e2864513978e2f5a58fe87 (diff) | |
download | rneovim-8c7e41f596e60031099c36c915a3f610b893d60e.tar.gz rneovim-8c7e41f596e60031099c36c915a3f610b893d60e.tar.bz2 rneovim-8c7e41f596e60031099c36c915a3f610b893d60e.zip |
[RFC] vim-patch:8.1.1365,8.1.1366,8.1.1367,8.1.1368,8.1.1382,8… (#10309)
[RFC] vim-patch:8.1.1365,8.1.1366,8.1.1367,8.1.1368,8.1.1382,8.1.1401
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index a39be0fe96..8dadf926b9 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -253,6 +253,7 @@ typedef struct vimoption { #define P_RWINONLY 0x10000000U ///< only redraw current window #define P_NDNAME 0x20000000U ///< only normal dir name chars allowed #define P_UI_OPTION 0x40000000U ///< send option to remote ui +#define P_MLE 0x80000000U ///< under control of 'modelineexpr' #define HIGHLIGHT_INIT \ "8:SpecialKey,~:EndOfBuffer,z:TermCursor,Z:TermCursorNC,@:NonText," \ @@ -1327,6 +1328,11 @@ int do_set( errmsg = (char_u *)_("E520: Not allowed in a modeline"); goto skip; } + if ((flags & P_MLE) && !p_mle) { + errmsg = (char_u *)_( + "E992: Not allowed in a modeline when 'modelineexpr' is off"); + goto skip; + } // In diff mode some options are overruled. This avoids that // 'foldmethod' becomes "marker" instead of "diff" and that // "wrap" gets set. |