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: read one line before resuming TUI to prevent unintentional operations #1636

Merged
merged 1 commit into from
Sep 24, 2022
Merged

fix: read one line before resuming TUI to prevent unintentional operations #1636

merged 1 commit into from
Sep 24, 2022

Conversation

kawaemon
Copy link
Contributor

@kawaemon kawaemon commented Dec 25, 2021

Partially fixes #1629.

I can't find any way to empty stdin buffer, so this PR fixes only inputs with no extra newlines.
e.g: typing zzzzzP<Enter> while processing commit is safe, but <Enter>zzzzzP<Enter><Enter> may cause big disaster.

@jesseduffield
Copy link
Owner

Apologies for the late review. I've just rebased this onto master and tested it. Works well. Not sure how to resolve the issue where enter is pressed inbetween other characters but this PR is an improvement upon the current logic

@jesseduffield
Copy link
Owner

Note to self: merge after tests pass

@jesseduffield jesseduffield merged commit 90feb4b into jesseduffield:master Sep 24, 2022
@kawaemon kawaemon deleted the partially-fix-1629 branch September 27, 2022 01:46
@kawaemon kawaemon restored the partially-fix-1629 branch September 27, 2022 01:46
@kawaemon kawaemon deleted the partially-fix-1629 branch September 27, 2022 01:46
@kawaemon kawaemon restored the partially-fix-1629 branch September 27, 2022 01:48
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.

Characters are passed to lazygit before Enter on return from commit
2 participants