diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-03 14:55:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-03 14:55:00 +0800 |
commit | 4dd793a256fefb481159f9f93bf7572391e266de (patch) | |
tree | 0a4a2c512f38b1e734fdb22650c2929fcd516c65 /src/nvim/ex_docmd.c | |
parent | 3a519d86bf4d5ef3ff5623ad925ed856266d80de (diff) | |
download | rneovim-4dd793a256fefb481159f9f93bf7572391e266de.tar.gz rneovim-4dd793a256fefb481159f9f93bf7572391e266de.tar.bz2 rneovim-4dd793a256fefb481159f9f93bf7572391e266de.zip |
vim-patch:9.0.1132: code is indented more than needed (#21626)
Problem: Code is indented more than needed.
Solution: Use an early return to reduce indentation. (Yegappan Lakshmanan,
closes vim/vim#11769)
https://github.com/vim/vim/commit/dc4daa3a3915fba11ac87d27977240d9a5e0d47d
Omit expand_autoload_callback(): only applies to Vim9 script.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 5b0adba650..c072977a53 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5171,11 +5171,13 @@ static void ex_find(exarg_T *eap) } } - if (fname != NULL) { - eap->arg = fname; - do_exedit(eap, NULL); - xfree(fname); + if (fname == NULL) { + return; } + + eap->arg = fname; + do_exedit(eap, NULL); + xfree(fname); } /// ":edit", ":badd", ":balt", ":visual". |