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

fix(lazygit): fix too larg size(100000) for lazygit_toogle method #4357

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xinleibird
Copy link

Description

In macOS, when I used an nvim-gui like Neovide, when I set up the multigrid feature, eovide will create the stage realistically -- will cause a memory leak by consuming a lot of memory, which will cause the Neovide to get hanging.

image

Just detect columns lines to set plugin toggleterm's width and height, no dependencies.

How Has This Been Tested?

  • Run command :lua require 'lvim.core.terminal'.lazygit_toggle()

@xinleibird xinleibird marked this pull request as ready for review September 4, 2023 10:59
Copy link
Collaborator

@kylo252 kylo252 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds like a bug in neovide? from :h columns

 You can use this command to get the widest
	window possible:  
		:set columns=9999
 	Minimum value is 12, maximum value is 10000.

another idea is to detect if running in a GUI and limit the width/height in that case, see neovide/neovide#919

Comment on lines +161 to +162
width = columns or 300,
height = lines or 200,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using or doesn't do anything, since vim.o.columns value is always has a value.

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.

None yet

3 participants