Skip to content

Commit f71b2ac

Browse files
authored
fix(ui): prevent style='minimal' from resetting window options on float update (#373)
Move `style = 'minimal'` from `base_config()` to `open_win()` so it only applies during initial window creation via `nvim_open_win`. Previously, `base_config()` included `style = 'minimal'` which was shared by both `open_win()` and `update()`. Every time `update()` called `nvim_win_set_config`, it re-applied `style = 'minimal'`, resetting window-local options like `signcolumn` and `foldcolumn` back to their minimal defaults. This caused the float window to lose its left gutter (signcolumn + foldcolumn) after any resize or dimension update, unlike the split layout which correctly retained these options.
1 parent 32860d7 commit f71b2ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/opencode/ui/float_layout.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ local function base_config(windows)
7171
height = height,
7272
row = resolve_position(float.row, vim.o.lines, height),
7373
col = resolve_position(float.col, vim.o.columns, width),
74-
style = 'minimal',
7574
border = float.border,
7675
}
7776
end
@@ -114,6 +113,7 @@ end
114113
---@param win_config vim.api.keyset.win_config
115114
---@return integer
116115
function M.open_win(buf, enter, win_config)
116+
win_config = vim.tbl_deep_extend('force', win_config, { style = 'minimal' })
117117
local win = vim.api.nvim_open_win(buf, enter, win_config)
118118
local float = config.ui.float or {}
119119
for opt, value in pairs(float.opts or {}) do

0 commit comments

Comments
 (0)