Terminal doesn't handle split UTF-8 sequence after ASCII#19337
Open
zeertzjq wants to merge 1 commit intovim:masterfrom
Open
Terminal doesn't handle split UTF-8 sequence after ASCII#19337zeertzjq wants to merge 1 commit intovim:masterfrom
zeertzjq wants to merge 1 commit intovim:masterfrom
Conversation
aebde01 to
9401a68
Compare
Member
Author
|
This doesn't break any existing libvterm tests. I tried to add new a libvterm test case: diff --git a/src/libvterm/t/14state_encoding.test b/src/libvterm/t/14state_encoding.test
index b1f5d6985..2c95066ed 100644
--- a/src/libvterm/t/14state_encoding.test
+++ b/src/libvterm/t/14state_encoding.test
@@ -103,3 +103,12 @@ PUSH "AB\xc4\x88D"
putglyph 0x0042 1 0,1
putglyph 0x0108 1 0,2
putglyph 0x0044 1 0,3
+
+!Split UTF-8 after US-ASCII
+RESET
+PUSH "\e(BAB\xc4"
+ putglyph 0x0041 1 0,0
+ putglyph 0x0042 1 0,1
+PUSH "\x88D"
+ putglyph 0x0108 1 0,2
+ putglyph 0x0044 1 0,3but it passes even without the patch. The added test case in test_terminal3.vim does fail without the patch. |
Member
Author
|
Oh, removing the |
eb7c28b to
2371982
Compare
Problem: Terminal doesn't handle split UTF-8 sequence after ASCII. Solution: Only use one UTF-8 encoding state per vterm state. fixes: vim#16559
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: Terminal doesn't handle split UTF-8 sequence after ASCII.
Solution: Only use one UTF-8 encoding state per vterm state.
fixes: #16559