Repository navigation
Fix zero-width grapheme attachment during pending wrap - #12581
Conversation
mitchellh
left a comment
There was a problem hiding this comment.
This makes sense, we should add a test to Terminal.zig too though that's the more appropriate place for this since the C tests are only run conditionally. You can keep that C test too though.
15cf1d7 to
04e8824
Compare
|
Added an equivalent test to Terminal.zig. Not sure what the policy is wrt to test redundancy. I can remove the test in |
This PR fixes an issue where a zero-width combining mark could attach to the wrong cell when the preceding character was written in the final column and the cursor had a pending wrap.
04e8824 to
c20fcfa
Compare
mitchellh
left a comment
There was a problem hiding this comment.
Approved pending CI.
General note: print is one of our most performance sensitive pieces of code, but this is specifically in the width == 0 branch which is not common, so adding more logic here is fine.
Not sure what the policy is wrt to test redundancy. I can remove the test in c/terminal.zig since that code path is now already covered.
Its fine, I don't mind duplicate tests that test at different layers.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
We need the fix I implemented in ghostty-org/ghostty#12581 for our tests to pass.
This PR fixes an issue where a zero-width combining mark could attach to the wrong cell when the preceding character was written in the final column and the cursor had a pending wrap.
The test I added used to fail before the fix, but it passes now.