zen-mode.nvim icon indicating copy to clipboard operation
zen-mode.nvim copied to clipboard

Height in zen-mode doesn't change after decreasing font in kitty

Open darteil opened this issue 4 years ago • 5 comments

Hello! After reducing the font in kitty, large gaps appear at the top and bottom in zen-mode. 2021-11-10_17-12

Screencast:

https://user-images.githubusercontent.com/31193144/141095926-9a996257-9331-46d4-8f45-3554f04e702c.mp4

Is it possible to make the zen-mod open to its full height after decreasing font in kitty?

darteil avatar Nov 10 '21 10:11 darteil

I believe I have a similar issue, where I use on_open to call xdgtool to toggle my terminal full screen. Perhaps a solution could be to add an on_open_pre callback (used by kitty as well) that is called before zen mode creates the floating windows?

lervag avatar Nov 16 '21 11:11 lervag

@darteil After you open Zen mode, does running this fix the gaps for you?

:lua require("zen-mode.view").fix_layout(true)

I have a similar issue with Neovide, I want to increase the font size when I enter Zen mode, so I wrote:

on_open = function(win)
  vim.opt.guifont = "SauceCodePro Nerd Font:h12:w57"
end

This does work, but the height of the Zen floating window is all wrong. When I press zz to center my viewport, it's clear that the floating window extends quite a bit below my window:

image

Confusingly, running fix_layout(true) at this point has no effect...

Hubro avatar Apr 11 '22 23:04 Hubro

@Hubro I tried calling this command in zen mode and without zen mode

:lua require("zen-mode.view").fix_layout(true)

Still the same, no effect :( Using a regular nvim v 0.6.1.

darteil avatar Apr 12 '22 11:04 darteil

Addendum to previous post

https://user-images.githubusercontent.com/31193144/162954166-374a69c7-7b1b-4e1f-b028-38e372702a05.mp4

darteil avatar Apr 12 '22 11:04 darteil