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

Lazygit from neovim inside tmux is slightly different than vanilla lazygit #3829

Open
shauryagoel opened this issue Aug 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@shauryagoel
Copy link

shauryagoel commented Aug 15, 2024

Describe the bug
If I open lazygit from neovim which is inside tmux I get different pane sizes than when opening lazygit from terminal inside tmux without neovim or when opening lazygit from neovim without tmux or when opening lazygit from terminal without tmux.
Lazygit from neovim inside tmux-
image

Lazygit inside neovim and without tmux-
image

As you can see, the pane sizes on the left-hand side are different in both cases.

To Reproduce
Steps to reproduce the behaviour:

  1. Open a new tmux session
  2. Open neovim inside it (nvim --clean)
  3. Open terminal inside neovim (:term)
  4. Type lazygit and press enter

For the second screenshot skip step 1 and follow from step 2 onwards.

Expected behaviour
In both cases, the corresponding pane sizes should be the same.

Screenshots
Added above while describing the bug.

Version info:
lazygit version- commit=58d746718056ea7ca802aafdd244d6abeb7255f8, build date=2024-08-09T10:19:46Z, build source=unknown, version=58d74671, os=darwin, arch=arm64, git version=2.44.0
git version- git version 2.44.0
neovim version- v0.10.1
tmux version- tmux 3.3a
OS: MacOS 14.4

Additional context

  1. I have manually built the lazygit using the commit 58d7467.
  2. I get the same result even after disabling any config for tmux and neovim.

If you want to try and debug this issue yourself, you can run lazygit --debug in one terminal panel and lazygit --logs in another to view the logs.
--> This does not show any useful errors

@shauryagoel shauryagoel added the bug Something isn't working label Aug 15, 2024
@stk-ableton
Copy link

This is not a bug. Lazygit has a threshold for the height of the window; when it gets smaller than that threshold (which is around 28 lines, it seems) it starts to shrink all non-focused side panels to a height of 1 line, to make more room for the active panel.

It seems that the added line for the status bar (showing "testing" and "util" in the first screenshot) makes it cross that threshold.

@shauryagoel
Copy link
Author

Yes you are right. I decreased the font size and now everything is working as expected. Is there a way to configure this threshold somewhere? I don't prefer shrinking of non-focused side panels.

@shauryagoel
Copy link
Author

Hi @stk-ableton, is there some way to config? I am unable to find any such config option.

@stefanhaller
Copy link
Collaborator

No, it's hard-coded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants