You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The erase function states that it erases to the left of the cursor, but the escape code it returns uses the value for erasing to the right of the cursor.
funerase(): String =>
""" Erases everything to the left of the cursor on the line the cursor is on.""""\x1B[0K"
Here's the definition of the erase in line escape code.
Code
Abbr
Name
Effect
CSI n K
EL
Erase in Line
Erases part of the line. If n is 0 (or missing), clear from cursor to the end of the line. If n is 1, clear from cursor to beginning of the line. If n is 2, clear entire line. Cursor position does not change.
Here's an example showing that it erases to the right of the cursor.
This seems like a fairly straightforward bug. Anyone who wants to can open a PR to correct the incorrect code. I don't think this requires additional discussion.
csos95
added a commit
to csos95/ponyc
that referenced
this issue
Feb 16, 2022
The `erase` function states that it erases to the left of the cursor, but the escape code it returns uses the value for erasing to the right of the cursor.
```pony
fun erase(): String =>
"""
Erases everything to the left of the cursor on the line the cursor is on.
"""
"\x1B[0K"
```
Fixes#4021
The
erase
function states that it erases to the left of the cursor, but the escape code it returns uses the value for erasing to the right of the cursor.Here's the definition of the erase in line escape code.
Here's an example showing that it erases to the right of the cursor.
The text was updated successfully, but these errors were encountered: