NIVM/lua/core/utils/window/init.lua
Robert Morrison fb537df11b chore(init): Initial working version
Create and push an initial working version of this repo before I change
things on this machine

Signed-off-by: Robert Morrison <robert@closedless.xyz>
2023-09-10 22:22:30 +01:00

22 lines
480 B
Lua

local M = {}
M.Modheight = function(change)
local win = vim.api.nvim_get_current_win()
local height = vim.api.nvim_win_get_height(win)
height = height + change
if height < 0 then height = 0 end
vim.api.nvim_win_set_height(win, height)
end
M.Modwidth = function(change)
local win = vim.api.nvim_get_current_win()
local width = vim.api.nvim_win_get_width(win)
width = width + change
if width < 0 then width = 0 end
vim.api.nvim_win_set_width(win, width)
end
return M