Skip to content

Fixes erase sequences #1

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ricobeck
Copy link

@ricobeck ricobeck commented Mar 30, 2022

Using this great library I found a bug when using the escape sequences:

(lldb) po type
ANSIEscapeCode.EraseInDisplayType.entireScreen

(lldb) po type.hashValue
1895992834708573398

(lldb) po "\(esc)\(type.hashValue)J"
"1895992834708573398J"

Hash values do not represent the index in an enum and are not stable across launches. So I used Int as base type and rawValue to build the character sequence.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant