mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 11:38:31 +00:00
feat(float): support toggle show float window
This commit is contained in:
@@ -113,6 +113,7 @@ typedef struct {
|
||||
String style;
|
||||
Boolean noautocmd;
|
||||
Boolean fixed;
|
||||
Boolean hide;
|
||||
} Dict(float_config);
|
||||
|
||||
typedef struct {
|
||||
|
@@ -165,6 +165,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
|
||||
///
|
||||
@@ -323,6 +324,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));
|
||||
@@ -848,6 +850,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
|
||||
}
|
||||
|
Reference in New Issue
Block a user