Merge pull request #25148 from glepnir/fixed_opt

fix(float): add fixed option
This commit is contained in:
bfredl
2023-09-19 11:49:59 +02:00
committed by GitHub
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

@@ -163,6 +163,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
///
@@ -845,6 +847,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
}