Skip to content

Commit

Permalink
feat(menu): readjust docs window
Browse files Browse the repository at this point in the history
fixes #89
  • Loading branch information
max397574 committed Nov 2, 2024
1 parent f02dd68 commit b1d9320
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lua/care/menu/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,15 @@ function Menu:draw_docs(entry)

local docs_view_conf = self.config.ui.docs_view or {}

self.docs_window:open_cursor_relative(width, height, win_offset, {
border = docs_view_conf.border,
position = self.menu_window.position,
max_height = docs_view_conf.max_height,
})
if self.docs_window:is_open() then
self.docs_window:readjust(height, width, win_offset)
else
self.docs_window:open_cursor_relative(width, height, win_offset, {
border = docs_view_conf.border,
position = self.menu_window.position,
max_height = docs_view_conf.max_height,
})
end

self.docs_window:set_scroll(1, 1, false)
self.docs_window:draw_scrollbar()
Expand Down

0 comments on commit b1d9320

Please sign in to comment.