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

Refactor App using standalone functions #2130

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Refactor App using standalone functions #2130

merged 1 commit into from
Sep 2, 2024

Conversation

xsebek
Copy link
Member

@xsebek xsebek commented Sep 1, 2024

  • Make appMain fit on the screen.
  • Replace state s1 and s2 versions with modifyIORef.

* Make `appMain` fit on screen.
* Replace state `s1` and `s2` versions with `modifyIORef`.
@xsebek xsebek added the Z-Refactoring This issue is about restructuring the code without changing the behaviour to improve code quality. label Sep 1, 2024
@@ -47,7 +56,7 @@ app eventHandler =
{ appDraw = drawUI
, appChooseCursor = chooseCursor
, appHandleEvent = eventHandler
, appStartEvent = enablePasteMode
, appStartEvent = pure ()
Copy link
Member

Choose a reason for hiding this comment

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

Why was enablePasteMode removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved it to buildVty - I don't see why you would not want the paste mode on reinitialize, and we already have a similar mouse option set there.

When does the mode come into play? Currently, we only have a one-line REPL.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, it allows us to strip newlines and paste the whole definition into one line.

So it works with the refactor. 🙂

@xsebek xsebek added the merge me Trigger the merge process of the Pull request. label Sep 2, 2024
@mergify mergify bot merged commit 589e266 into main Sep 2, 2024
12 checks passed
@mergify mergify bot deleted the refactor-app branch September 2, 2024 15:40
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. Z-Refactoring This issue is about restructuring the code without changing the behaviour to improve code quality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants