Skip to content

Conversation

@TonWin618
Copy link
Contributor

fixes #1406

  • I have read the Contribution Guidelines
  • I have commented on the issue above and discussed the intended changes
  • A maintainer has signed off on the changes and the issue was assigned to me
  • All newly added code is adequately covered by tests
  • All existing tests are still running without errors
  • The documentation was modified to reflect the changes OR no documentation changes are required.

Changes

  • Added logic to handle the correct deletion of wide characters.
  • The UnicodeCalculator.GetWidth method is used to determine the width of the last character.
  • If the character width is 1, the console deletes the character with \b \b.
  • If the character width is 2, the console deletes the character with \b \b\b \b.
  • These changes ensure that the console accurately deletes characters, preventing display issues with wide characters.

Please upvote 👍 this pull request if you are interested in it.

Copy link
Contributor

@patriksvensson patriksvensson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@patriksvensson patriksvensson merged commit bb72b44 into spectreconsole:main Aug 1, 2024
@patriksvensson
Copy link
Contributor

Merged! Thank you for your contribution. Much appreciated! 👍

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 this pull request may close these issues.

AnsiConsole.Ask has problem with inputting wide characters

2 participants