Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] LazyGit window should resize with the viewport #116

Open
chenasraf opened this issue Feb 4, 2024 · 0 comments · May be fixed by #117
Open

[Request] LazyGit window should resize with the viewport #116

chenasraf opened this issue Feb 4, 2024 · 0 comments · May be fixed by #117
Labels
enhancement New feature or request

Comments

@chenasraf
Copy link

chenasraf commented Feb 4, 2024

First of all thanks for a great plugin!

Is your feature request related to a problem? Please describe.

Using tmux panes, or any window/pane resizing feature of your terminal, causes the nvim virtual screen to resize. If I open LazyGit in tmux or a terminal, resizing the viewport doesn't cause LazyGit inside nvim to adapt to the new size.

It works on LazyGit from the terminal, so I believe the nvim window/frame is the one not resizing accordingly.

Additionally, things like Telescope previews can listen to the window resize and adjust accordingly, and the same problem happens in any terminal when resizing, so it is not an inherent tmux+nvim limitation.

Just open LG from nvim and resize the window to see.

image

Screenshots of issue

  1. Before opening, while zoomed out
    image
  2. After opening, while zoomed out
    image
  3. After zooming into the nvim pane with LG still open
    image

This works in the other direction as well:

  1. Before opening, while zoomed in
    image
  2. After opening, while zoomed in
    image
  3. After zooming out the nvim pane with LG still open
    image

Describe the solution you'd like

Ideally, the containing window of LG should resize when the nvim viewport resizes.

Additional context

My config:

return {
  "kdheepak/lazygit.nvim",
  -- optional for floating window border decoration
  dependencies = {
    "nvim-lua/plenary.nvim",
  },
  config = function()
    vim.keymap.set('n', '<leader>gs', '<Cmd>LazyGit<CR>', { desc = 'Lazy[G]it', silent = true })
  end,
}
@chenasraf chenasraf added the enhancement New feature or request label Feb 4, 2024
@chenasraf chenasraf changed the title [Request] LazyGit window should resize with the screen [Request] LazyGit window should resize with the viewport Feb 7, 2024
@chenasraf chenasraf linked a pull request Feb 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant