You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seems to be triggered by certain latex characters are in the prompt
julia> 0b0000 ⊻ 0b0000
deleting the last 0 (and second last 0) character with x , or replacing (r) does not work, ( not sure other ways this is broken , but these two are what i noticed as of now)
pkg version:
[51b3953f] VimBindings v0.3.12
The text was updated successfully, but these errors were encountered:
Thank you for the report—on the surface, it seems it could be related to these other issues related to bad behavior when the cursor is at the end of the prompt, #92 and #93. Or perhaps it's an issue of counting the text width incorrectly when determining the valid range for an operation, because this would explain why the bug surfaces with special characters like ⊻ which occupy more than one byte.
Ideally, no operation should be operating directly with bytes, but alas I wrote much of the code before I properly understood Julia's String implementation.
Hopefully there's a common root cause that will get all these fixed for the next version
Ha, okay this is funny. I wrote a unit test containing your example, and then identified what I believe is the source of the bug (indeed using the byte length of the prompt). But still, the test is failing.
Turns out that the utility function I created to help write concise tests is itself broken! The idea is that I ought to be able to write a string which is transformed into a test prompt buffer, and it just needs to contain a pipe | where the cursor ought to be (and optionally a mode indicator by wrapping the mode in a pipe, e.g. |i| for insert mode). For instance:
julia>testbuf("f(x) = x * |2")
VimBuffer("f(x) = x * |n|2")
But for a prompt containing characters represented by multiple codeunits...
It does not behave well. Oops! Quite a challenge to hammer a nail when your hammer is only a hammer for the easy nails!
Anyways, I'm fixing up that test buffer mechanism, certainly needs to be rock solid. Then I'll test the changes I've made that I am hopeful fix this (it does in my REPL) and put out a release once that's verified.
seems to be triggered by certain latex characters are in the prompt
deleting the last
0
(and second last0
) character withx
, or replacing (r
) does not work, ( not sure other ways this is broken , but these two are what i noticed as of now)pkg version:
The text was updated successfully, but these errors were encountered: