Skip to content

fix(api): nvim_open_win default to half-size for splits#36088

Merged
seandewar merged 1 commit intoneovim:masterfrom
seandewar:open_win-regress
Oct 8, 2025
Merged

fix(api): nvim_open_win default to half-size for splits#36088
seandewar merged 1 commit intoneovim:masterfrom
seandewar:open_win-regress

Conversation

@seandewar
Copy link
Member

@seandewar seandewar commented Oct 8, 2025

Problem: after #35601, nvim_open_win incorrectly attempts to set the size of a split window to 0 if it wasn't specified.

Solution: only attempt to set the size again if it was actually specified. This has the effect of defaulting to half the size of the parent window (or it may be equalized with other windows to make room), like before.

Fix #36080

Problem: after neovim#35601, nvim_open_win incorrectly attempts to set the size of a
split window to 0 if it wasn't specified.

Solution: only attempt to set the size again if it was actually specified. This
has the effect of defaulting to half the size of the parent window, like before.
@github-actions github-actions bot added the api libnvim, Nvim RPC API label Oct 8, 2025
@seandewar seandewar enabled auto-merge (rebase) October 8, 2025 16:06
@seandewar seandewar disabled auto-merge October 8, 2025 16:06
@seandewar seandewar enabled auto-merge (squash) October 8, 2025 16:07
@seandewar seandewar merged commit d7472c0 into neovim:master Oct 8, 2025
44 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 8, 2025
Problem: after #35601, nvim_open_win incorrectly attempts to set the size of a
split window to 0 if it wasn't specified.

Solution: only attempt to set the size again if it was actually specified. This has the effect of defaulting to half the size of the parent window (or it may be equalized with other windows to make room), like before.

Fix #36080

(cherry picked from commit d7472c0)
@neovim-backports
Copy link

Successfully created backport PR for release-0.11:

@seandewar seandewar deleted the open_win-regress branch October 8, 2025 16:23
github-actions bot pushed a commit that referenced this pull request Oct 8, 2025
Problem: after #35601, nvim_open_win incorrectly attempts to set the size of a
split window to 0 if it wasn't specified.

Solution: only attempt to set the size again if it was actually specified. This has the effect of defaulting to half the size of the parent window (or it may be equalized with other windows to make room), like before.

Fix #36080

(cherry picked from commit d7472c0)
justinmk added a commit to justinmk/neovim that referenced this pull request Nov 2, 2025
Following is a list of commits (fixes/features only) in this release.
See `:help news` in Nvim for release notes.

FEATURES
--------------------------------------------------------------------------------
- 6937721 help: gx opens help tag in web browser (neovim#35784)
- f9cad88 vimscript: log function name in "fast" message neovim#32616

PERFORMANCE
--------------------------------------------------------------------------------
- 4c8486e scheduler priority clamping on macOS neovim#35488
- 0f6a180 api: reduce redundant `win_find_tabpage` calls (neovim#35643)

FIXES
--------------------------------------------------------------------------------
- 4e4428d vim.lsp.omnifunc should not throw away other items neovim#35346
- f2fb46e api: nvim_open_win default to half-size for splits (neovim#36088)
- 479bb9c api: nvim_open_win respects requested split window size (neovim#35601)
- 5aa6257 api: win_set_config error message for splitting from a float neovim#35650
- 66b8018 channel: closing socket with pending writes leaks memory (neovim#36400)
- 3237f63 cjson: fix `strbuf_set_length` incorrectness neovim#35565
- 95cc675 clipboard: avoid using stale register width (neovim#36178)
- d31953d diagnostics: extend conversion support from/to quickfix format (neovim#34006)
- 7304fc2 excmd: :trust executed even when inside false condition (neovim#36032)
- 0e1c83f filetype: handle invalid `bufnr` in _getlines(), _getline() neovim#36272
- 86b2c0f float: crash from nasty :fclose autocmds (neovim#36137)
- d8a7c86 health: errors in :checkhealth with pyenv-virtualenv neovim#35865
- 8e00534 health: hard fail on invalid "python-*" bin neovim#35382
- 2668a46 lsp: "attempt to index nil config" neovim#36189
- 21540d2 lsp: _get_workspace_folders does not handle root_dir() function (neovim#36141)
- 14e74d9 lsp: misleading logs in non-applicable filetypes neovim#35749
- a7eb110 lsp: noisy log message when enabling server without config neovim#36264
- eb48372 lsp: restore Client:stop() force-stopping behavior (neovim#35800)
- 556d8d0 lsp: treat 2-triggers-at-once as "last char wins" neovim#35435
- 7b1ac20 lua: don't leak handle when vim._watch.watch() fails (neovim#35768)
- c84ba83 options: increase t_Co buffer size (neovim#35859)
- 7aea000 paste: don't use :echo immediately before :redraw (neovim#35773)
- 47f6f21 plines: count 'showbreak' in EOL inline virt_text in line size (neovim#35921)
- 4338eea rpc: handle more cases when identifying loopback neovim#36100
- d399ed3 socket: avoid stack-use-after-return after timeout (neovim#36405)
- 4cc060b statusline: redraw if Visual selection other end changes (neovim#36281)
- 7f5427b terminal: add various missing redraws
- d78d5cf terminal: adjust marks when deleting scrollback lines (neovim#36294)
- f3f6705 terminal: avoid events messing up topline of focused terminal
- 8c5bc49 terminal: avoid tailed cursor in focused terminal in events
- 934d285 terminal: check size when creating new tabpage
- e67fec1 terminal: deleting from wrong buffer (neovim#36289)
- e4db5ed terminal: don't trigger TextChangedT for unrelated redraws
- 854b319 terminal: handle OSC 8 split into multiple fragments
- a6d8f40 terminal: keep last cursor if it's on the last row
- 46d68e5 terminal: patch various autocommand-related holes
- 5ee9e3f terminal: possibly wrong wrow/wcol in active terminal
- b21ec36 terminal: remove condition that buf is curbuf (neovim#33721)
- 2eea65f terminal: update winopts and focus when switching terminals
- 169dc60 terminal: wrong row in TermRequest with full scrollback (neovim#36298)
- 8f05fdb tests: ignore vector math types
- 924a8e4 tui: don't wait for DA1 response when stdin is closed (neovim#35745)
- 07184aa tui: handle sequence larger than entire buffer
- 1c8805e vim.json: fix truncation of decoded numbers outside lua_Integer's range neovim#35702
- 8c31138 window: don't add a hsep when out of room if global stl is off

VIM PATCHES
--------------------------------------------------------------------------------
- dd79bc8 014c731: runtime(doc): make :h virtcol() more accurate (neovim#35976)
- c2a3838 8.1.0636: line2byte() gives wrong values with text properties
- a0dac39 8.1.1681: insert stray "{" when listener gets buffer line
- d573ffc 8.1.1700: listener callback called for the wrong buffer
- 7159a01 8.1.1711: listener callback called at the wrong moment
- b6dd8bb 8.1.2008: error for invalid range when using listener and undo
- 03f9df8 8.2.0115: byte2line() does not work correctly with text properties
- d1a0d08 8.2.0844: text properties crossing lines not handled correctly
- 9b55451 8.2.0853: ml_delete() often called with FALSE argument
- c8912d7 8.2.3348: line2byte() returns wrong value after adding textprop
- b0ed4a3 8.2.3795: too many #ifdefs
- e4bbe09 8.2.4379: an empty change is reported to a listener
- 5c6ea43 80981e1: runtime(doc): mention 'findfunc' at :h :find (neovim#35697)
- 8634a46 9.1.0689: [security]: buffer-overflow in do_search() with 'rightleft'
- a839200 9.1.0695: tests: test_crash leaves Untitled file around
- 61aab4c 9.1.0698: tests: "Untitled" file not removed when running Test_crash1_3 alone
- 85e4503 9.1.1754: :helptags doesn't skip examples with syntax
- 77fe01f 9.1.1773: Crash in BufLeave after BufUnload closes other windows (neovim#35830)
- 7e724df 9.1.1780: mbyte contains overlapping list of utf_classes table (neovim#35869)
- 4db62d9 9.1.1798: Wrong display with 'sms' and long wrapped virt text at EOL (neovim#35930)
- 9c09983 9.1.1802: 'nowrap' in a modeline may hide malicious code (neovim#35946)
- 67688ab 9.1.1807: :set doesn't clear local insecure flag like :setlocal does
- 6dda8e9 9.1.1808: Option insecure flags not copied when splitting window
- ac48d9c 9.1.1823: diff: w_topline may be invalidated (neovim#36018)
- e1fe0ed 9.1.1831: stray vseps in right-most 'winfixwidth' window
- d21c23b 9.1.1836: 'culopt' "screenline" not redrawn with line("w0") and :retab
- aab8134 9.1.1839: Window may have wrong height if resized from another tabpage (neovim#36093)
- ad172eb 9.1.1858: v:register not reset after Visual mode command (neovim#36215)
- a431901 9.1.1868: v:register is wrong in v_: command (neovim#36238)
- 8928ede 9.1.1870: :Tutor may not work as expected (neovim#36343)
- 1b27d8f 9.1.1871: Wrong 'showcmd' in the cmdwin (neovim#36320)
- a2d4a0f 9.1.1885: Wrong restored cursor pos when re-entering buffer after changes
- 7790dca 9.1.1891: g<End> does not move to last non-blank in visual mode (neovim#36354)
- 88ff561 9.1.1893: ICCF charity will dissolve (neovim#36427)
- 19d58cb a0f37db: runtime(doc): use a single pattern in :h 'incsearch' example (neovim#35721)
- 8ed1ef1 partial:9.0.0323: using common name in tests leads to flaky tests

CI
--------------------------------------------------------------------------------
- e415fae Windows arm64 packages neovim#35345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api libnvim, Nvim RPC API ci:backport release-0.11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nvim_open_win no longer equalizes windows by default

1 participant