Skip to content

Conversation

nnhutan
Copy link

@nnhutan nnhutan commented Jan 20, 2024

When using the hyper theme with preview config, the logo is shown by the preview command on the preview window is always on the top of the screen. I think the problem is on line 7 of file lua/dashboard/preview.lua:

   local row = math.floor(opt.height / 5)

The position of the preview window seems to be fixed.
So my solution is updating the position row of the preview window after rendering all components
In lua/dashboard/theme/hyper.lua, line 495. I found:

  local size = math.floor(vim.o.lines / 2)
      - math.ceil(api.nvim_buf_line_count(config.bufnr) / 2)
      - 2
  local fill = utils.generate_empty_table(size)

So I set the value for the row attribute to size to make the preview window to be on the right position as the normal logo(header)

PS: Forgive my poor English.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant