From 882fa848b3500f4793a7752f73a97ab63876eb29 Mon Sep 17 00:00:00 2001 From: r0nsha Date: Fri, 27 Jun 2025 17:25:54 +0300 Subject: [PATCH] move default `width` to `defaults` --- lua/lib/config.lua | 1 + lua/lib/input.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lib/config.lua b/lua/lib/config.lua index 2b17dc2..bc242e8 100644 --- a/lua/lib/config.lua +++ b/lua/lib/config.lua @@ -28,6 +28,7 @@ return { focusable = true, relative = "cursor", col = -1, + width = 1, height = 1, }, }, diff --git a/lua/lib/input.lua b/lua/lib/input.lua index c04f9c4..e1ad0f3 100644 --- a/lua/lib/input.lua +++ b/lua/lib/input.lua @@ -33,8 +33,8 @@ function Input:open(default) -- Position window relative to the cursor, such that it doesn't overlap with the cursor's line. local curr_win = vim.api.nvim_get_current_win() local cursor_row = vim.api.nvim_win_get_cursor(curr_win)[1] - local win_config = (cursor_row <= 3) and { anchor = "NW", row = 1, width = 1 } - or { anchor = "SW", row = 0, width = 1 } + local win_config = (cursor_row <= 3) and { anchor = "NW", row = 1 } + or { anchor = "SW", row = 0 } self.config = vim.tbl_deep_extend("keep", self.config, { win = win_config }) -- Create buffer and floating window. -- 2.51.2