feat: Add min width for auto size

This commit is contained in:
Myzel394 2023-10-08 16:05:05 +02:00
parent 56ddbeda71
commit f1ed142aec

View File

@ -74,6 +74,9 @@ function M:_set_window_positions()
local width = self:get_table_width() local width = self:get_table_width()
local _, height = get_window_size(self.table:cols_amount(), self.table:rows_amount()) local _, height = get_window_size(self.table:cols_amount(), self.table:rows_amount())
width = math.max(20, width)
height = math.max(10, height)
vim.api.nvim_win_set_config(self.preview_window, { vim.api.nvim_win_set_config(self.preview_window, {
width = width, width = width,
height = height, height = height,