mirror of
https://github.com/neovim/neovim.git
synced 2026-08-30 19:11:52 +00:00
feat(api): add nvim_win_resize()
Ref #6645 Problem: When a window is resized it takes space from the window right/below first, and only falls back to the window left/above when there is no more room. Sometimes a user wants the space to come from a specific direction. Solution: Add nvim_win_resize(win, width, height, {anchor}) which resizes a window with a choosable anchor edge, letting a window grow leftwards or upwards by taking space from the window to the left or above first. The default anchor reproduces nvim_win_set_width()/nvim_win_set_height().
This commit is contained in:
3
runtime/lua/vim/_meta/api_keysets.gen.lua
generated
3
runtime/lua/vim/_meta/api_keysets.gen.lua
generated
@@ -493,6 +493,9 @@ error('Cannot require a meta file')
|
||||
--- @field zindex? integer
|
||||
--- @field _cmdline_offset? integer
|
||||
|
||||
--- @class vim.api.keyset.win_resize
|
||||
--- @field anchor? string
|
||||
|
||||
--- @class vim.api.keyset.win_text_height
|
||||
--- @field end_row? integer
|
||||
--- @field end_vcol? integer
|
||||
|
||||
Reference in New Issue
Block a user