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

Prompt isn't preceeded by newline #122

Closed
mromyers opened this issue Apr 10, 2015 · 1 comment
Closed

Prompt isn't preceeded by newline #122

mromyers opened this issue Apr 10, 2015 · 1 comment
Assignees
Labels

Comments

@mromyers
Copy link

scratch.rkt> (display 'x)
xscratch.rkt> 

This might be the desired behavior, but it's difficult to work around something like

scratch.rkt> (:print-type 0)
Zeroscratch.rkt> 

since :print-type only works on the top-level.

@greghendershott
Copy link
Owner

I agree, this has annoyed me, too.

Probably I can use port-count-lines! on the output port to determine the column and issue a newline if needed.

@greghendershott greghendershott self-assigned this Apr 10, 2015
greghendershott pushed a commit that referenced this issue Apr 14, 2015
Makes more sense there. Also will turn out to be important when there
are other users of display-prompt, such as on the debugger branch.

cf commit 0dbbcc0 and issue #122
greghendershott pushed a commit that referenced this issue Apr 14, 2015
I encountered a situation where our error display handler called
fresh-line, which called flush-output on a closed port... which led to
an error... therefore back to the error display handler and an infinite
loop.

Although I haven't been able to reproduce this and therefore can't test
this, I'm adding this defensive check.

(I'm not sure the "just in case" flush-output that I inherited form
xrepl is even necessary -- deleting it entirely is another possible
fix.)

cf 0dbbcc0 issue #122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants