From 88a40f1cc3af846b520ae167f0177b5faa148c86 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 12 Jun 2024 18:29:35 +0200 Subject: [PATCH] fix: correct invalid float positions. Fixes #502 --- lua/trouble/view/window.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/trouble/view/window.lua b/lua/trouble/view/window.lua index ecfb06a7..5361b9f4 100644 --- a/lua/trouble/view/window.lua +++ b/lua/trouble/view/window.lua @@ -153,7 +153,7 @@ function M.new(opts) elseif opts.type == "float" then opts.relative = opts.relative or "editor" opts.size = opts.size or { width = 0.8, height = 0.8 } - opts.position = opts.position or { 0.5, 0.5 } + opts.position = type(opts.position) == "table" and opts.poition or { 0.5, 0.5 } elseif opts.type == "main" then opts.type = "float" opts.relative = "win"