Skip to content

Commit 6fece15

Browse files
authored
fix(calendar): give calendar enough space to render (#950)
1 parent 9a55117 commit 6fece15

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/neorg/modules/core/ui/calendar/module.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ module.private = {
6262
end,
6363

6464
open_window = function(options)
65+
local MIN_HEIGHT = 14
66+
6567
local buffer, window = module.required["core.ui"].create_split(
6668
"calendar-" .. tostring(os.clock()):gsub("%.", "-"),
67-
{},
68-
options.height or math.floor(vim.opt.lines:get() * 0.3)
69+
{}, options.height or MIN_HEIGHT + (options.padding or 0)
6970
)
7071

7172
vim.api.nvim_create_autocmd({ "WinClosed", "BufDelete" }, {

0 commit comments

Comments
 (0)