vim-patch:9.0.1246: code is indented more than necessary (#22006)

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes vim/vim#11887)

142ed77898

Omit function_using_block_scopes(): only affects Vim9 script.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2023-01-26 21:05:34 +08:00
committed by GitHub
parent e02df23b4e
commit 41aa5ce3eb
3 changed files with 26 additions and 21 deletions

View File

@@ -2985,10 +2985,12 @@ void u_saveline(linenr_T lnum)
/// (this is used externally for crossing a line while in insert mode)
void u_clearline(void)
{
if (curbuf->b_u_line_ptr != NULL) {
XFREE_CLEAR(curbuf->b_u_line_ptr);
curbuf->b_u_line_lnum = 0;
if (curbuf->b_u_line_ptr == NULL) {
return;
}
XFREE_CLEAR(curbuf->b_u_line_ptr);
curbuf->b_u_line_lnum = 0;
}
/// Implementation of the "U" command.