mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 05:46:12 +00:00
fix(api): fix 'winborder' preventing splits with nvim_open_win (#32981)
While at it, rename the p_winbd variable to p_winborder, as 'winbd' is not the option's short name. Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -1273,13 +1273,18 @@ static bool parse_win_config(win_T *wp, Dict(win_config) *config, WinConfig *fco
|
||||
}
|
||||
}
|
||||
|
||||
if (HAS_KEY_X(config, border) || *p_winbd != NUL) {
|
||||
Object border_style = OBJECT_INIT;
|
||||
if (HAS_KEY_X(config, border)) {
|
||||
if (is_split) {
|
||||
api_set_error(err, kErrorTypeValidation, "non-float cannot have 'border'");
|
||||
goto fail;
|
||||
}
|
||||
Object style = config->border.type != kObjectTypeNil ? config->border : CSTR_AS_OBJ(p_winbd);
|
||||
parse_border_style(style, fconfig, err);
|
||||
border_style = config->border;
|
||||
} else if (*p_winborder != NUL) {
|
||||
border_style = CSTR_AS_OBJ(p_winborder);
|
||||
}
|
||||
if (border_style.type != kObjectTypeNil) {
|
||||
parse_border_style(border_style, fconfig, err);
|
||||
if (ERROR_SET(err)) {
|
||||
goto fail;
|
||||
}
|
||||
|
Reference in New Issue
Block a user