Convert FOR_ALL_WINDOWS to use a locally declared pointer

This commit is contained in:
Wayne Rowcliffe
2014-08-20 18:35:07 -05:00
parent 3f5482d325
commit fe99930c46
12 changed files with 138 additions and 154 deletions

View File

@@ -4306,7 +4306,6 @@ did_set_string_option (
/* When 'spelllang' or 'spellfile' is set and there is a window for this
* buffer in which 'spell' is set load the wordlists. */
else if (varp == &(curbuf->b_s.b_p_spl) || varp == &(curbuf->b_s.b_p_spf)) {
win_T *wp;
int l;
if (varp == &(curbuf->b_s.b_p_spf)) {
@@ -4317,10 +4316,11 @@ did_set_string_option (
}
if (errmsg == NULL) {
FOR_ALL_WINDOWS(wp)
if (wp->w_buffer == curbuf && wp->w_p_spell) {
errmsg = did_set_spelllang(wp);
break;
FOR_ALL_WINDOWS(wp) {
if (wp->w_buffer == curbuf && wp->w_p_spell) {
errmsg = did_set_spelllang(wp);
break;
}
}
}
}