Skip to content

Commit

Permalink
layout float fix rightwidth close #1278
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Sep 7, 2023
1 parent 70fe95c commit 834db53
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/lspsaga/layout/float.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ function M.right(left_winid, opt)
end

local WIDTH = api.nvim_win_get_width(win_conf.win)
win_conf.col = win_conf.col[false] + win_conf.width + 2
local col = win_conf.col[false] + win_conf.width + 2
local row = win_conf.row[false]
win_conf.width = WIDTH == vim.o.columns and WIDTH - win_conf.col - 2
or (vim.o.columns - win_conf.col >= 80 and 80 or vim.o.columns - win_conf.col)
if opt.width then
win_conf.width = math.floor(WIDTH * opt.width)
end

win_conf.row = row
win_conf.col = col
win_conf.title = nil
win_conf.title_pos = nil
if win_conf.border then
Expand Down

0 comments on commit 834db53

Please sign in to comment.