vim-patch:9.0.1158: code is indented more than necessary (#21697)

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

7f8b2559a3

Omit reset_last_used_map(): only used in Vim9 script.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2023-01-09 07:16:36 +08:00
committed by GitHub
parent 904c13e6b5
commit a174f4e53f
3 changed files with 82 additions and 58 deletions

View File

@@ -1150,10 +1150,12 @@ static void ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr)
{
// check for NULL pointer, not to return an error to the user, but
// to prevent a crash
if (stack_ptr != NULL) {
stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr;
search_ctx->ffsc_stack_ptr = stack_ptr;
if (stack_ptr == NULL) {
return;
}
stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr;
search_ctx->ffsc_stack_ptr = stack_ptr;
}
/// Pop a dir from the directory stack.