0
0
mirror of https://github.com/vim/vim.git synced 2025-11-10 10:47:23 -05:00

patch 9.0.1221: code is indented more than necessary

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11833)
This commit is contained in:
Yegappan Lakshmanan
2023-01-18 18:17:48 +00:00
committed by Bram Moolenaar
parent 4aecaa168e
commit f97a295cca
9 changed files with 753 additions and 751 deletions

View File

@@ -1367,13 +1367,13 @@ failed:
void
ui_remove_balloon(void)
{
if (balloon_array != NULL)
{
pum_undisplay();
while (balloon_arraysize > 0)
vim_free(balloon_array[--balloon_arraysize].pum_text);
VIM_CLEAR(balloon_array);
}
if (balloon_array == NULL)
return;
pum_undisplay();
while (balloon_arraysize > 0)
vim_free(balloon_array[--balloon_arraysize].pum_text);
VIM_CLEAR(balloon_array);
}
/*
@@ -1410,19 +1410,19 @@ ui_post_balloon(char_u *mesg, list_T *list)
else
balloon_arraysize = split_message(mesg, &balloon_array);
if (balloon_arraysize > 0)
{
pum_array = balloon_array;
pum_size = balloon_arraysize;
pum_compute_size();
pum_scrollbar = 0;
pum_height = balloon_arraysize;
if (balloon_arraysize <= 0)
return;
pum_position_at_mouse(BALLOON_MIN_WIDTH);
pum_selected = -1;
pum_first = 0;
pum_redraw();
}
pum_array = balloon_array;
pum_size = balloon_arraysize;
pum_compute_size();
pum_scrollbar = 0;
pum_height = balloon_arraysize;
pum_position_at_mouse(BALLOON_MIN_WIDTH);
pum_selected = -1;
pum_first = 0;
pum_redraw();
}
/*