Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@rhendric
Copy link
Collaborator

@rhendric rhendric commented Oct 5, 2016

This is an ugly hack, but it fixes the issue where the REPL will
sometimes stop responding to arrow keys after an error has been thrown
in user code. Turns out, this happens whenever a string (or anything
other than something with Error in its prototype hierarchy) is thrown.
The fix is to restore "raw mode" on the input TTY handle when this
situation is detected, by the time-honored method of turning it off and
on again.

There's also a (basically) one-line commit in here that cleans up a double [Function] message that has been hanging around since Coco.

Close #733

This line has been in here since Coco, and I can't see any reason why it
should be kept. Can you?
This is an ugly hack, but it fixes the issue where the REPL will
sometimes stop responding to arrow keys after an error has been thrown
in user code. Turns out, this happens whenever a string (or anything
other than something with Error in its prototype hierarchy) is thrown.
The fix is to restore "raw mode" on the input TTY handle when this
situation is detected, by the time-honored method of turning it off and
on again.
@rhendric rhendric changed the title Fix #733 Fix REPL break on improper errors Oct 5, 2016
@gkz gkz merged commit 81644ac into gkz:master Oct 5, 2016
@heavyk
Copy link

heavyk commented Oct 5, 2016

what happened to the full repl implementation that was there last night?

I was gonna give it a go today... looked pretty extensive

edit; oops, nevermind... didn't see the there were two prs... nice!

@rhendric
Copy link
Collaborator Author

rhendric commented Oct 5, 2016

Almost all of that REPL code is still there; I just pulled it out of command.ls into repl.ls in another recently merged commit.

@rhendric rhendric deleted the repl-errors branch May 4, 2023 20:16
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.

REPL breaks on some errors

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.