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

Fix incorrect code returned by ANSI.erase #4022

Merged
merged 3 commits into from
Feb 16, 2022
Merged

Conversation

csos95
Copy link
Contributor

@csos95 csos95 commented 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.

fun erase(): String =>
  """
  Erases everything to the left of the cursor on the line the cursor is on.
  """
  "\x1B[0K"

Fixes #4021

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Feb 16, 2022
@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Feb 16, 2022
@ponylang-main
Copy link
Contributor

Hi @csos95,

The changelog - fixed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.

Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 4022.md to match the number of this pull request.

The basic format of the release notes (using markdown) should be:

## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.

@SeanTAllen SeanTAllen changed the title change ANSI.escape to return the correct escape code (fixes #4021) Change ANSI.escape to return the correct escape code Feb 16, 2022
@SeanTAllen SeanTAllen changed the title Change ANSI.escape to return the correct escape code Fix incorrect code returned by ANSI.erase Feb 16, 2022
.release-notes/4022.md Outdated Show resolved Hide resolved
@SeanTAllen
Copy link
Member

I modified the title, main PR body, and release notes. When this passes CI, it can be merged and the top comment of the PR should be used as the final commit body.

@SeanTAllen SeanTAllen merged commit 666d23b into ponylang:main Feb 16, 2022
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Feb 16, 2022
github-actions bot pushed a commit that referenced this pull request Feb 16, 2022
github-actions bot pushed a commit that referenced this pull request Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ANSI.erase erases the wrong side
3 participants