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

Luvit's repl weird behavior when writing a long code #1107

Open
Bilal2453 opened this issue Apr 22, 2020 · 3 comments
Open

Luvit's repl weird behavior when writing a long code #1107

Bilal2453 opened this issue Apr 22, 2020 · 3 comments

Comments

@Bilal2453
Copy link
Contributor

Bilal2453 commented Apr 22, 2020

Pressing backspace/arrow keys while writing a code that's longer than the terminal width will result in duplicated lines.

According to @truemedian on luvit's Discord server, this is caused by this code, as it resets it to the left edge but never goes up.

Pic of the issue:
ChLjvpHn4f


luvit version: 2.17.0

@squeek502
Copy link
Member

This is something I've been meaning to fix for a long time. How do other repls handle this? Do they allow the line to wrap and handle the wrapping, or do they truncate the line so that it never wraps?

P.S. you got the markdown formatting on your code link reversed

@truemedian
Copy link
Member

NodeJS handles this by calculating what line the buffer is on here which gets used in readline's refreshLine set here and is used here

@Bilal2453
Copy link
Contributor Author

Bilal2453 commented Apr 22, 2020

P.S. you got the markdown formatting on your code link reversed

oops... i know how to write markdown, don't I :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants