aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/api.lua
diff options
context:
space:
mode:
authorSean Dewar <6256228+seandewar@users.noreply.github.com>2026-03-10 20:59:48 +0000
committerSean Dewar <6256228+seandewar@users.noreply.github.com>2026-03-14 20:48:31 +0000
commit7be4ae796faa2066044b6cafe266ebe6354c55fe (patch)
tree1f78eeb4789de78cf686b123bb6ab9237ec413e0 /runtime/lua/vim/_meta/api.lua
parentdc00f628a2f2fee31143edfd457d13e85f30846c (diff)
downloadrneovim-7be4ae796faa2066044b6cafe266ebe6354c55fe.tar.gz
rneovim-7be4ae796faa2066044b6cafe266ebe6354c55fe.tar.bz2
rneovim-7be4ae796faa2066044b6cafe266ebe6354c55fe.zip
fix(api): relax config validation for "win"
Problem: only possible to move floats between tabpages if relative=win, which has the restrictive effect of also anchoring it to the target window. Solution: allow "win" without "relative" or "split"/"vertical". Only assume missing "win" is 0 if relative=win is given to maintain that behaviour. (or when configuring a new window) Also add an error when attempting to change a split into a float that's in another tabpage, as this isn't actually supported yet. (until the next commit) Maybe this could do with some bikeshedding. Unclear if "win" should require "relative" to be given, like with "row"/"col"; this can be annoying though as specifying "relative" requires other fields to be given too.
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
-rw-r--r--runtime/lua/vim/_meta/api.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index 975db4ac3b..0510e2bef9 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -1848,8 +1848,9 @@ function vim.api.nvim_open_term(buffer, opts) end
--- Default is `"left"`.
--- - vertical: Split vertically `:vertical`.
--- - width: Window width (in character cells). Minimum of 1.
---- - win: `window-ID` window to split, or relative window when creating a float (relative="win").
---- When splitting, negative value works like `:topleft`, `:botright`.
+--- - win: `window-ID` target window. Can be in a different tab page. Determines the window to
+--- split (negative values act like `:topleft`, `:botright`), the relative window for a
+--- `relative="win"` float, or just the target tab page (inferred from the window) for others.
--- - zindex: Stacking order. floats with higher `zindex` go on top on
--- floats with lower indices. Must be larger than zero. The
--- following screen elements have hard-coded z-indices: