Skip to content

fix(ui): prevent re-applying style='minimal' on float UI#373

Merged
sudo-tee merged 1 commit into
sudo-tee:mainfrom
yct21:fix-floating-window
May 9, 2026
Merged

fix(ui): prevent re-applying style='minimal' on float UI#373
sudo-tee merged 1 commit into
sudo-tee:mainfrom
yct21:fix-floating-window

Conversation

@yct21
Copy link
Copy Markdown
Contributor

@yct21 yct21 commented May 9, 2026

Fixes a bug where the float layout re-applies style = 'minimal' after update_dimensions, resetting window-local options that were explicitly set by output_window.setup().

Problem

When using position = "float", window options like signcolumn = 'yes' and foldcolumn = '1' (set by output_window.setup()) get reset to 'auto' and '0'. This happens because:

  1. output_window.setup() sets signcolumn = 'yes' and foldcolumn = '1'
  2. update_dimensions() is called immediately after
  3. float_layout.update()nvim_win_set_config() re-applies style = 'minimal' from base_config()
  4. style = 'minimal' resets signcolumn and foldcolumn back to their minimal defaults

This causes the floating window to lose its left gutter, unlike the split layout which correctly retains these options.

image

Fix

Move style = 'minimal' from base_config() into open_win() so it only applies during the initial nvim_open_win() call, not during subsequent nvim_win_set_config() updates.

image

…at update

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.
@sudo-tee
Copy link
Copy Markdown
Owner

sudo-tee commented May 9, 2026

Thanks for the fix.

@sudo-tee sudo-tee merged commit f71b2ac into sudo-tee:main May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants