fix(float): add fixd option

This commit is contained in:
glepnir
2023-09-14 13:30:51 +08:00
parent a6e74c1f0a
commit fd08fd3de3
8 changed files with 102 additions and 1 deletions

View File

@@ -112,6 +112,7 @@ typedef struct {
String footer_pos;
String style;
Boolean noautocmd;
Boolean fixed;
} Dict(float_config);
typedef struct {

View File

@@ -160,6 +160,8 @@
/// - noautocmd: If true then no buffer-related autocommand events such as
/// |BufEnter|, |BufLeave| or |BufWinEnter| may fire from
/// 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.
///
/// @param[out] err Error details, if any
///
@@ -841,6 +843,10 @@ static bool parse_float_config(Dict(float_config) *config, FloatConfig *fconfig,
fconfig->noautocmd = config->noautocmd;
}
if (HAS_KEY_X(config, fixed)) {
fconfig->fixed = config->fixed;
}
return true;
#undef HAS_KEY_X
}