Skip to content

Commit

Permalink
fix: correct invalid float positions. Fixes #502
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 12, 2024
1 parent 3609bb9 commit 88a40f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/trouble/view/window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

2 comments on commit 88a40f1

@Rumi152
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@folke I think there is a typo at "opts.poition"

@folke
Copy link
Owner Author

@folke folke commented on 88a40f1 Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. fixed now. Thanks~

Please sign in to comment.