diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-07-05 13:22:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-05 13:22:16 -0400 |
| commit | 8dfe4d662929d441c7eaaf444e79a4f9a2af0997 (patch) | |
| tree | 2ff5e7acbb754a843468d25f9a30d49c38aa46dc /runtime/lua/vim/_meta/api.gen.lua | |
| parent | 1f18ea1cf7881cece01857bcff04439e810b3429 (diff) | |
| download | rneovim-8dfe4d662929d441c7eaaf444e79a4f9a2af0997.tar.gz rneovim-8dfe4d662929d441c7eaaf444e79a4f9a2af0997.tar.bz2 rneovim-8dfe4d662929d441c7eaaf444e79a4f9a2af0997.zip | |
fix(api): nvim_win_resize tweaks #40596
Diffstat (limited to 'runtime/lua/vim/_meta/api.gen.lua')
| -rw-r--r-- | runtime/lua/vim/_meta/api.gen.lua | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/runtime/lua/vim/_meta/api.gen.lua b/runtime/lua/vim/_meta/api.gen.lua index 2d59179f3c..78b3a28c18 100644 --- a/runtime/lua/vim/_meta/api.gen.lua +++ b/runtime/lua/vim/_meta/api.gen.lua @@ -2504,24 +2504,22 @@ function vim.api.nvim_win_hide(win) end --- @return boolean # true if the window is valid, false otherwise function vim.api.nvim_win_is_valid(win) end ---- Resize a window, choosing which edge stays anchored. +--- Resizes a window, anchored to a given edge. --- ---- The window first takes space from the non-anchored side (the window below or ---- to the right by default), and only then from the anchored side. The "anchor" ---- selects the fixed edge, so a window can also grow upwards or leftwards. +--- The window first takes space from the non-anchored side, and only then from the anchored side. +--- The "anchor" decides the fixed edge, so a window can grow or shrink in any direction. --- ---- Can set the height, the width, or both in a single call. "anchor" applies to the ---- matching axis ("top"/"bottom" for height, "left"/"right" for width); the other ---- axis, if also resized, uses its default anchor. +--- Can set height, width (only for a vertical split), or both. The "anchor" applies to the matching +--- axis (top/bottom for height, left/right for width); the other axis uses its default anchor. --- --- @param win integer `window-ID`, or 0 for current window ---- @param width integer New width as a count of columns, set -1 as "no change" ---- @param height integer New height as a count of rows, set -1 as "no change" +--- @param width integer New width (columns), or -1 for "no change". +--- @param height integer New height (rows), or -1 for "no change". --- @param opts vim.api.keyset.win_resize Optional parameters. --- - anchor: Edge that stays fixed while the opposite edge moves; the --- neighbor on the moving side is resized first. One of: ---- - "top" (default for height) or "bottom" ---- - "left" (default for width) or "right" +--- - "top" (default) or "bottom" +--- - "left" (default) or "right" function vim.api.nvim_win_resize(win, width, height, opts) end --- Sets the current buffer in a window. |