mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 14:56:08 +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:
@@ -880,12 +880,14 @@ static int matchadd_dict_arg(typval_T *tv, const char **conceal_char, win_T **wi
|
||||
*conceal_char = tv_get_string(&di->di_tv);
|
||||
}
|
||||
|
||||
if ((di = tv_dict_find(tv->vval.v_dict, S_LEN("window"))) != NULL) {
|
||||
*win = find_win_by_nr_or_id(&di->di_tv);
|
||||
if (*win == NULL) {
|
||||
emsg(_(e_invalwindow));
|
||||
return FAIL;
|
||||
}
|
||||
if ((di = tv_dict_find(tv->vval.v_dict, S_LEN("window"))) == NULL) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
*win = find_win_by_nr_or_id(&di->di_tv);
|
||||
if (*win == NULL) {
|
||||
emsg(_(e_invalwindow));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
return OK;
|
||||
|
Reference in New Issue
Block a user