Skip to content

Commit

Permalink
[utils]: make result window width static
Browse files Browse the repository at this point in the history
  • Loading branch information
udayvir-singh committed Mar 1, 2023
1 parent 7e80596 commit 4f60c6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
8 changes: 3 additions & 5 deletions fnl/tangerine/utils/window.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,14 @@
"defines a floating window with height 'lineheight'."
(normalize-parent (vim.api.nvim_get_current_win))
(let [buffer (vim.api.nvim_create_buf false true)
win-width (vim.api.nvim_win_get_width 0)
win-height (vim.api.nvim_win_get_height 0)
bordersize 2
width (- win-width bordersize)
height (math.max 1 (math.floor (math.min (/ win-height 1.5) lineheight)))]
(vim.api.nvim_open_win buffer true {
: width
: height
:col 0
:row (- win-height bordersize height win-stack.total)
:col 0
:height height
:width 360
:style "minimal"
:anchor "NW"
:border "single"
Expand Down
10 changes: 4 additions & 6 deletions lua/tangerine/utils/window.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4f60c6f

Please sign in to comment.