aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeni Chasnovski <evgeni.chasnovski@gmail.com>2025-02-23 19:08:16 +0200
committerGitHub <noreply@github.com>2025-02-23 09:08:16 -0800
commit07c5f41da3ad5a609e74da47685f430fcc4896fe (patch)
tree742ba44ecd124a2bb732146af3592bcab377e91b /src
parent6bc79790449f8bbf238b740bf6eb33cea88e4295 (diff)
downloadrneovim-07c5f41da3ad5a609e74da47685f430fcc4896fe.tar.gz
rneovim-07c5f41da3ad5a609e74da47685f430fcc4896fe.tar.bz2
rneovim-07c5f41da3ad5a609e74da47685f430fcc4896fe.zip
fix(float): can set title/footer without setting border #32594
Problem: setting title and/or footer without explicitly setting border shows "title/footer/ requires border to be set" error. At the same time, explicitly setting `border = "none"` (which is default) shows expected no-border-no-title-no-footer window without error. Solution: allow setting title/footer without explicitly setting border.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/win_config.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c
index 1132452faf..527689b17c 100644
--- a/src/nvim/api/win_config.c
+++ b/src/nvim/api/win_config.c
@@ -1240,11 +1240,6 @@ static bool parse_win_config(win_T *wp, Dict(win_config) *config, WinConfig *fco
api_set_error(err, kErrorTypeValidation, "non-float cannot have 'title'");
goto fail;
}
- // title only work with border
- if (!HAS_KEY_X(config, border) && !fconfig->border) {
- api_set_error(err, kErrorTypeException, "title requires border to be set");
- goto fail;
- }
parse_bordertext(config->title, kBorderTextTitle, fconfig, err);
if (ERROR_SET(err)) {
@@ -1267,11 +1262,6 @@ static bool parse_win_config(win_T *wp, Dict(win_config) *config, WinConfig *fco
api_set_error(err, kErrorTypeValidation, "non-float cannot have 'footer'");
goto fail;
}
- // footer only work with border
- if (!HAS_KEY_X(config, border) && !fconfig->border) {
- api_set_error(err, kErrorTypeException, "footer requires border to be set");
- goto fail;
- }
parse_bordertext(config->footer, kBorderTextFooter, fconfig, err);
if (ERROR_SET(err)) {