mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 14:25:32 +00:00
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.
This commit is contained in:
5
runtime/lua/vim/_meta/api.lua
generated
5
runtime/lua/vim/_meta/api.lua
generated
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user