aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-09-22 13:38:58 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-09-22 13:38:58 -0400
commit1c84a0e09093d728408024a6baa9967df596be54 (patch)
tree3038828072136affc9de36257ac49ba069ede25b /src/nvim/option.c
parenta4b9e0df67ae95777f8f7d833e7d4c6b8fc3840c (diff)
parent22bd722c011b04a5fff3182c370c877d82e0fbe0 (diff)
downloadrneovim-1c84a0e09093d728408024a6baa9967df596be54.tar.gz
rneovim-1c84a0e09093d728408024a6baa9967df596be54.tar.bz2
rneovim-1c84a0e09093d728408024a6baa9967df596be54.zip
Merge pull request #1108 from war1025/dev/for_all_tabs
FOR_ALL_TAB_WINDOWS cleanup. Add FOR_ALL_TABS and FOR_ALL_WINDOWS_IN_TAB.
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index b26b6ed4cc..96265681df 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -2210,17 +2210,16 @@ set_options_default (
int opt_flags /* OPT_FREE, OPT_LOCAL and/or OPT_GLOBAL */
)
{
- int i;
- win_T *wp;
- tabpage_T *tp;
-
- for (i = 0; !istermoption(&options[i]); i++)
- if (!(options[i].flags & P_NODEFAULT))
+ for (int i = 0; !istermoption(&options[i]); i++) {
+ if (!(options[i].flags & P_NODEFAULT)) {
set_option_default(i, opt_flags, p_cp);
+ }
+ }
/* The 'scroll' option must be computed for all windows. */
- FOR_ALL_TAB_WINDOWS(tp, wp)
- win_comp_scroll(wp);
+ FOR_ALL_TAB_WINDOWS(tp, wp) {
+ win_comp_scroll(wp);
+ }
}
/// Set the Vi-default value of a string option.
@@ -5532,13 +5531,11 @@ set_num_option (
errmsg = e_positive;
curbuf->b_p_tw = 0;
}
- {
- win_T *wp;
- tabpage_T *tp;
- FOR_ALL_TAB_WINDOWS(tp, wp)
+ FOR_ALL_TAB_WINDOWS(tp, wp) {
check_colorcolumn(wp);
}
+
}
/*