From f1ed142aecfecdeab75b966bd3f8e8e76e58b6c0 Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Sun, 8 Oct 2023 16:05:05 +0200 Subject: [PATCH] feat: Add min width for auto size --- lua/easytables/window.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/easytables/window.lua b/lua/easytables/window.lua index bb2f77a..f2b957b 100644 --- a/lua/easytables/window.lua +++ b/lua/easytables/window.lua @@ -74,6 +74,9 @@ function M:_set_window_positions() local width = self:get_table_width() 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, { width = width, height = height,