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: initialize Term::Button::Type type to resolve uninitialized variable exception in event.cpp #387

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

Conversation

gomes042
Copy link

Problem:

In Windows Terminal on Windows 11, using CTRL+ Mouse Scroll🖱️ was causing the following exception: Exception has occurred: The variable 'type' is being used without being initialized.

This occurred because the Term::Button::Type type variable was accessed without being properly initialized during the event handling.

Solution:

The type variable has been explicitly initialized to Button::Type::None, ensuring that it has a valid default value before being accessed. This prevents the uninitialized variable exception.

Impact:

This fix resolves the exception triggered by CTRL+ Mouse Scroll🖱️ in Windows Terminal, allowing the event to be processed without errors.

⚠️ Warning (Zoom not working):

While this fix resolves the crash, zooming with CTRL+ Mouse Scroll🖱️ is still not functional. (Different of CTRL+ or CTRL-)

This PR does not address the zoom functionality.

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