Mercurial > vim
comparison src/option.c @ 717:2fa8cb05b861 v7.0218
updated for version 7.0218
author | vimboss |
---|---|
date | Wed, 08 Mar 2006 21:32:40 +0000 |
parents | 0f9f4761ad9c |
children | 82ef0c58b012 |
comparison
equal
deleted
inserted
replaced
716:8ae24f338cab | 717:2fa8cb05b861 |
---|---|
3772 * | 3772 * |
3773 * 'arg' may be IObuff, but only when no errors can be present and option | 3773 * 'arg' may be IObuff, but only when no errors can be present and option |
3774 * does not need to be expanded with option_expand(). | 3774 * does not need to be expanded with option_expand(). |
3775 * "opt_flags": | 3775 * "opt_flags": |
3776 * 0 for ":set" | 3776 * 0 for ":set" |
3777 * OPT_GLOBAL for ":setglobal" | 3777 * OPT_GLOBAL for ":setglobal" |
3778 * OPT_LOCAL for ":setlocal" and a modeline | 3778 * OPT_LOCAL for ":setlocal" and a modeline |
3779 * OPT_MODELINE for a modeline | 3779 * OPT_MODELINE for a modeline |
3780 * OPT_WINONLY to only set window-local options | |
3781 * OPT_NOWIN to skip setting window-local options | |
3780 * | 3782 * |
3781 * returns FAIL if an error is detected, OK otherwise | 3783 * returns FAIL if an error is detected, OK otherwise |
3782 */ | 3784 */ |
3783 int | 3785 int |
3784 do_set(arg, opt_flags) | 3786 do_set(arg, opt_flags) |
3973 | 3975 |
3974 /* Skip all options that are not window-local (used when showing | 3976 /* Skip all options that are not window-local (used when showing |
3975 * an already loaded buffer in a window). */ | 3977 * an already loaded buffer in a window). */ |
3976 if ((opt_flags & OPT_WINONLY) | 3978 if ((opt_flags & OPT_WINONLY) |
3977 && (opt_idx < 0 || options[opt_idx].var != VAR_WIN)) | 3979 && (opt_idx < 0 || options[opt_idx].var != VAR_WIN)) |
3980 goto skip; | |
3981 | |
3982 /* Skip all options that are window-local (used for :vimgrep). */ | |
3983 if ((opt_flags & OPT_NOWIN) && opt_idx >= 0 | |
3984 && options[opt_idx].var == VAR_WIN) | |
3978 goto skip; | 3985 goto skip; |
3979 | 3986 |
3980 /* Disallow changing some options from modelines */ | 3987 /* Disallow changing some options from modelines */ |
3981 if ((opt_flags & OPT_MODELINE) && (flags & P_SECURE)) | 3988 if ((opt_flags & OPT_MODELINE) && (flags & P_SECURE)) |
3982 { | 3989 { |