Skip to content

refactor Terminal and Operation ioloops#16

Merged
slingamn merged 4 commits intomasterfrom
ioloops.3
Mar 27, 2023
Merged

refactor Terminal and Operation ioloops#16
slingamn merged 4 commits intomasterfrom
ioloops.3

Conversation

@slingamn
Copy link
Copy Markdown
Member

cc @wader @tpodowd

This does a lot of things:

  1. Removes (*Operation).ioloop: instead (*Operation).Runes() makes an ordinary function call into the functionality formerly provided by ioloop
  2. Refactors (*Terminal).ioloop so that KickRead no longer needs to be public
  3. Prepares for a later change where (*Instance).Readline will be able to take a context.Context argument to provide timeouts
  4. Removes race conditions around reading the CPR (in particular, it should fix the race where the CPR can be printed to the screen, the original motivation for this refactor)

* Suspend/resume has never worked on Windows (the OS lacks the relevant
  functionality). Normally Ctrl-Z means EOF in Windows, which ends
  the program.
* Listen for SIGCONT to detect resumption
* Move platform-specific code to internal/platform
This is supposed to make the search list move backwards,
but it didn't work in my testing. Regardless, we want to
handle this now that Terminal will emit MetaShiftTab, to
prevent it from ending up in the rune buffer.
@slingamn slingamn merged commit a4f442d into master Mar 27, 2023
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