Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Cover more edge cases when resize window #72

Merged
merged 7 commits into from
Oct 9, 2020

Conversation

0x2c7
Copy link
Owner

@0x2c7 0x2c7 commented Oct 9, 2020

In recent implementation, whenever the window is resized, a control flow event is raised, and captured by outsider, and redraw the screen. There are known issues:

  • If Jard is processing a line of code in REPL, resize event interrupts the processing, and pops out. It's unexpected, and annoying for anyone who uses tmux.
  • If the main thread is sleeping, or busy, the resize events may cause resize event error, and crash the process ([BUG] Control command is empty #70)
  • Pending input is lost during resizing

So, it's better to defer the resizing event to whenever REPL session is idle. However, at that time, if there is any output printed out during the evaluation, the users may not see it as the screen is refresh. therefore, I decided to replay the output into the screen after resizing is done.
Screenshot from 2020-10-09 16-19-57

@0x2c7 0x2c7 force-pushed the bug/control-command-is-empty branch from fbc0f62 to 4bcd05e Compare October 9, 2020 09:42
@0x2c7 0x2c7 merged commit 798dc83 into master Oct 9, 2020
@0x2c7 0x2c7 deleted the bug/control-command-is-empty branch October 9, 2020 10:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant