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

PAGE incorrectly leaves cursor at bottom left #203

Open
rgizz opened this issue Feb 11, 2025 · 3 comments · May be fixed by #204
Open

PAGE incorrectly leaves cursor at bottom left #203

rgizz opened this issue Feb 11, 2025 · 3 comments · May be fixed by #204

Comments

@rgizz
Copy link

rgizz commented Feb 11, 2025

PAGE is supposed to leave the cursor at the top left of the terminal, according to the standard. However, in pforth, PAGE leaves the cursor at the bottom left.

I suggest this.

: page ( -- , clear screen )
$1B emit [char] [ emit
." 1;H" $1B emit [char] [ emit ." 2J" ;

Thank you very much for pforth.

philburk added a commit that referenced this issue Feb 15, 2025
It was leaving the cursor at the bottom left.
Forth ANS standard says to leave at top left.

Fixes #203
@philburk
Copy link
Owner

You are right about the standard!
https://forth-standard.org/standard/facility/PAGE

I implemented the move to top-left using:

ESC[ ." H"

@philburk philburk linked a pull request Feb 15, 2025 that will close this issue
@philburk
Copy link
Owner

@rgizz - what do you think about PR #204

@rgizz
Copy link
Author

rgizz commented Feb 17, 2025 via email

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 a pull request may close this issue.

2 participants