mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +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:
@@ -1449,9 +1449,11 @@ void show_popupmenu(void)
|
||||
}
|
||||
|
||||
// Only show a popup when it is defined and has entries
|
||||
if (menu != NULL && menu->children != NULL) {
|
||||
pum_show_popupmenu(menu);
|
||||
if (menu == NULL || menu->children == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
pum_show_popupmenu(menu);
|
||||
}
|
||||
|
||||
/// Execute "menu". Use by ":emenu" and the window toolbar.
|
||||
|
Reference in New Issue
Block a user