diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-04-10 14:29:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-10 14:29:23 +0200 |
commit | 436e0147f415d1a778994d0685cd1dd30b8c925f (patch) | |
tree | 420a815b355d92da41621714d537cec82e06e1b0 /src/nvim/api/win_config.c | |
parent | 7801ffc38aedbbd527e614b6ba5ad60ecf380470 (diff) | |
parent | da979ae04b7a8c56586ed0233957600ad6af99f0 (diff) | |
download | rneovim-436e0147f415d1a778994d0685cd1dd30b8c925f.tar.gz rneovim-436e0147f415d1a778994d0685cd1dd30b8c925f.tar.bz2 rneovim-436e0147f415d1a778994d0685cd1dd30b8c925f.zip |
Merge pull request #22865 from MunifTanjim/issue-20370
fix(api): do not re-apply win_config.style when missing
Diffstat (limited to 'src/nvim/api/win_config.c')
-rw-r--r-- | src/nvim/api/win_config.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c index 23bd5d2f48..c267fee39a 100644 --- a/src/nvim/api/win_config.c +++ b/src/nvim/api/win_config.c @@ -108,8 +108,8 @@ /// The default value for floats are 50. In general, values below 100 are /// recommended, unless there is a good reason to overshadow builtin /// elements. -/// - style: Configure the appearance of the window. Currently only takes -/// one non-empty value: +/// - style: (optional) Configure the appearance of the window. Currently +/// only supports one value: /// - "minimal" Nvim will display the window with many UI options /// disabled. This is useful when displaying a temporary /// float where the text should not be edited. Disables @@ -222,9 +222,11 @@ void nvim_win_set_config(Window window, Dict(float_config) *config, Error *err) win_config_float(win, fconfig); win->w_pos_changed = true; } - if (fconfig.style == kWinStyleMinimal) { - win_set_minimal_style(win); - didset_window_options(win, true); + if (HAS_KEY(config->style)) { + if (fconfig.style == kWinStyleMinimal) { + win_set_minimal_style(win); + didset_window_options(win, true); + } } } |