mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
fix(api): make win_set_config with "win" for splits need "split/vertical"
Problem: currently, for splits, nvim_win_set_config accepts win without any of split or vertical set, which has little effect and seems error-prone. Solution: require at least one of split or vertical to also be set for splits. Also, update nvim_win_set_config docs, as it's no longer limited to just floating and external windows.
This commit is contained in:
8
runtime/lua/vim/_meta/api.lua
generated
8
runtime/lua/vim/_meta/api.lua
generated
@ -2207,11 +2207,11 @@ function vim.api.nvim_win_remove_ns(window, ns_id) end
|
||||
--- @param buffer integer Buffer handle
|
||||
function vim.api.nvim_win_set_buf(window, buffer) end
|
||||
|
||||
--- Configures window layout. Currently only for floating and external windows
|
||||
--- (including changing a split window to those layouts).
|
||||
--- Configures window layout. Cannot be used to move the last window in a
|
||||
--- tabpage to a different one.
|
||||
---
|
||||
--- When reconfiguring a floating window, absent option keys will not be
|
||||
--- changed. `row`/`col` and `relative` must be reconfigured together.
|
||||
--- When reconfiguring a window, absent option keys will not be changed.
|
||||
--- `row`/`col` and `relative` must be reconfigured together.
|
||||
---
|
||||
--- @param window integer Window handle, or 0 for current window
|
||||
--- @param config vim.api.keyset.win_config Map defining the window configuration, see `nvim_open_win()`
|
||||
|
Reference in New Issue
Block a user