aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-09-30 13:40:35 +0200
committerGitHub <noreply@github.com>2023-09-30 13:40:35 +0200
commit578d63417609de9677bc4bf5be3b265766ef2083 (patch)
treeb26ffc04ae41aae5c796fb75fe650e7a7d5b5716 /src/nvim/api
parent960170e4469b96c5c3d06ba1bb84c9edeaa04b8b (diff)
parent4200a0f1678c06c6da4e4cfb0184c29c1174ed21 (diff)
downloadrneovim-578d63417609de9677bc4bf5be3b265766ef2083.tar.gz
rneovim-578d63417609de9677bc4bf5be3b265766ef2083.tar.bz2
rneovim-578d63417609de9677bc4bf5be3b265766ef2083.zip
Merge pull request #25386 from glepnir/toggle_float
feat(float): support toggle show float window
Diffstat (limited to 'src/nvim/api')
-rw-r--r--src/nvim/api/keysets.h1
-rw-r--r--src/nvim/api/win_config.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/api/keysets.h b/src/nvim/api/keysets.h
index 236e75983e..429826f231 100644
--- a/src/nvim/api/keysets.h
+++ b/src/nvim/api/keysets.h
@@ -113,6 +113,7 @@ typedef struct {
String style;
Boolean noautocmd;
Boolean fixed;
+ Boolean hide;
} Dict(float_config);
typedef struct {
diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c
index 656f33aab1..ca7086ab7f 100644
--- a/src/nvim/api/win_config.c
+++ b/src/nvim/api/win_config.c
@@ -167,6 +167,7 @@
/// calling this function.
/// - fixed: If true when anchor is NW or SW, the float window
/// would be kept fixed even if the window would be truncated.
+/// - hide: If true the floating window will be hidden.
///
/// @param[out] err Error details, if any
///
@@ -325,6 +326,7 @@ Dictionary nvim_win_get_config(Window window, Error *err)
PUT(rv, "focusable", BOOLEAN_OBJ(config->focusable));
PUT(rv, "external", BOOLEAN_OBJ(config->external));
+ PUT(rv, "hide", BOOLEAN_OBJ(config->hide));
if (wp->w_floating) {
PUT(rv, "width", INTEGER_OBJ(config->width));
@@ -850,6 +852,10 @@ static bool parse_float_config(Dict(float_config) *config, FloatConfig *fconfig,
fconfig->fixed = config->fixed;
}
+ if (HAS_KEY_X(config, hide)) {
+ fconfig->hide = config->hide;
+ }
+
return true;
#undef HAS_KEY_X
}