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 removing multibyte characters in prompt, fixes #974 #2383
base: master
Are you sure you want to change the base?
Conversation
in lua 5.3 you can do rshift with |
Oh, i see I've just realized that you can just compare if byte is in range [128;192) instead, huh |
Codecov Report
@@ Coverage Diff @@
## master #2383 +/- ##
==========================================
+ Coverage 83.97% 83.98% +0.01%
==========================================
Files 477 477
Lines 32750 32746 -4
==========================================
+ Hits 27502 27503 +1
+ Misses 5248 5243 -5
|
mb you got installed it from luarocks as dep for some other app? |
luarocks said that it is installed and |
This change does what i've said in #974, works well for me.
There is always that one thing that I miss (multiple times), ugh |
I've realized that there is also an unfixed delete if byte < 128 => remove 1 byte May i commit such a fix when i get back to my PC? |
idk, mb to add some helper to |
Update:
And yeah, awful.prompt's cursor variable counts bytes and not codepoints (as it did) to make string.sub function useful (and not to redo awful.prompt completely) and cursor moves by calculated delta of bytes. |
@necauqua any update on this? |
Uh, completely forgot about this, I'm sorry. |
no worries, take your time; i was just checking up for stalled PRs |
This change does what i've said in #974, works well for me.