0
0
mirror of https://github.com/vim/vim.git synced 2025-10-23 08:44:20 -04:00

patch 9.0.1098: code uses too much indent

Problem:    Code uses too much indent.
Solution:   Use an early return. (Yegappan Lakshmanan, closes #11747)
This commit is contained in:
Yegappan Lakshmanan
2022-12-26 12:50:04 +00:00
committed by Bram Moolenaar
parent b3d614369f
commit 465de3a57b
6 changed files with 226 additions and 222 deletions

View File

@@ -225,19 +225,19 @@ handle_foldcolumn(win_T *wp, winlinevars_T *wlv)
// Allocate a buffer, "wlv->extra[]" may already be in use.
vim_free(wlv->p_extra_free);
wlv->p_extra_free = alloc(MAX_MCO * fdc + 1);
if (wlv->p_extra_free != NULL)
{
wlv->n_extra = (int)fill_foldcolumn(wlv->p_extra_free,
wp, FALSE, wlv->lnum);
wlv->p_extra_free[wlv->n_extra] = NUL;
wlv->p_extra = wlv->p_extra_free;
wlv->c_extra = NUL;
wlv->c_final = NUL;
if (use_cursor_line_highlight(wp, wlv->lnum))
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_CLF));
else
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_FC));
}
if (wlv->p_extra_free == NULL)
return;
wlv->n_extra = (int)fill_foldcolumn(wlv->p_extra_free,
wp, FALSE, wlv->lnum);
wlv->p_extra_free[wlv->n_extra] = NUL;
wlv->p_extra = wlv->p_extra_free;
wlv->c_extra = NUL;
wlv->c_final = NUL;
if (use_cursor_line_highlight(wp, wlv->lnum))
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_CLF));
else
wlv->char_attr = hl_combine_attr(wlv->wcr_attr, HL_ATTR(HLF_FC));
}
#endif