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

Handle Ctrl-D in REPL and trigger toggling Quit Modal #743

Merged
merged 4 commits into from
Oct 12, 2022

Conversation

0xcefaedfe
Copy link
Collaborator

Implements #345

When Ctrl-D is received by handleREPLEvent, it checks if the prompt is empty (for both CmdPrompt and SearchPrompt cases). If it is empty, it calls toggleModal.

I'm new to Haskell in general, so if there's a better way to do this, please let me know.

Copy link
Member

@xsebek xsebek left a comment

Choose a reason for hiding this comment

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

Thanks, @0xcefaedfe! I tested it and it works for me 👍

Please refactor the code with the text lens. Once you are done add the Merge me label.

src/Swarm/TUI/Controller.hs Outdated Show resolved Hide resolved
@xsebek
Copy link
Member

xsebek commented Oct 12, 2022

@0xcefaedfe you can apply the correct formatting by using fourmolu-0.4 (see #744) or use the helpful restyled bot output:

info     NOTE: you can manually apply these fixes by running:
info                                    
info         git checkout <your branch> 
info         curl https://restyled.io/gh/swarm-game/repos/swarm/jobs/2379705/patch | git am
info         git push                   

Because we keep the main branch formatted consistently, you should rarely see the formatter change any of the lines you did not edit in your PR. 😉

@byorgey byorgey added the merge me Trigger the merge process of the Pull request. label Oct 12, 2022
@mergify mergify bot merged commit 727a5b2 into swarm-game:main Oct 12, 2022
@byorgey
Copy link
Member

byorgey commented Oct 12, 2022

@0xcefaedfe , congrats on having your first PR accepted to Swarm! We appreciate the contribution and we're really glad to welcome you as part of the community. In a minute we will send you an invite to the repo (see https://github.com/swarm-game/swarm/blob/main/CONTRIBUTING.md#i-have-push-access-to-the-swarm-repository-now-what ).

@byorgey byorgey mentioned this pull request Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants