mirror of
https://github.com/neovim/neovim.git
synced 2025-10-13 13:26:06 +00:00
vim-patch:partial:9.0.1196: code is indented more than necessary (#21796)
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11813)
e857598896
Partial port as this depends on some previous eval and 'smoothscroll'
patches.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -767,11 +767,13 @@ void mf_set_fnames(memfile_T *mfp, char *fname)
|
||||
/// Used before doing a :cd
|
||||
void mf_fullname(memfile_T *mfp)
|
||||
{
|
||||
if (mfp != NULL && mfp->mf_fname != NULL && mfp->mf_ffname != NULL) {
|
||||
xfree(mfp->mf_fname);
|
||||
mfp->mf_fname = mfp->mf_ffname;
|
||||
mfp->mf_ffname = NULL;
|
||||
if (mfp == NULL || mfp->mf_fname == NULL || mfp->mf_ffname == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
xfree(mfp->mf_fname);
|
||||
mfp->mf_fname = mfp->mf_ffname;
|
||||
mfp->mf_ffname = NULL;
|
||||
}
|
||||
|
||||
/// Return true if there are any translations pending for memfile.
|
||||
|
Reference in New Issue
Block a user