apainintheneck / crystal-linenoise

Crystal bindings for the Linenoise library
https://apainintheneck.github.io/crystal-linenoise/
MIT License
1 stars 0 forks source link

Fix single line cursor offset bug #22

Closed apainintheneck closed 8 months ago

apainintheneck commented 8 months ago

The cursor based its offset on the literal length of the line not the visual length of the line which caused problems when using escape codes. This fix was pulled in from an upstream branch and it fixes the calculation for the cursor.

Note: This bug is still present in the multiline version though.

Thanks for the fix @olegat!

olegat commented 8 months ago

Happy to help! 😄