Skip to content
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

[bugfix] Chinese characters are chopped #227 #239

Conversation

andy380743909
Copy link

@andy380743909
Copy link
Author

sorry, this PR does not totally fix the issue. because the space char after every Chinese char engage a cell.
I'm not very clear with the logic of the space char. Can I just remove it?

@migueldeicaza
Copy link
Owner

Thanks for the patch, I think this is a step in the right direction, but I need to rethink a bit this code.

@andy380743909
Copy link
Author

Thanks for the patch, I think this is a step in the right direction, but I need to rethink a bit this code.

yes, I agree with you. And I read the iTerm2 source code, but it's really too complex, I'm searching for the NSAttributedString building logic in it's source code.

https://github.com/gnachman/iTerm2/blob/1a0c9a53616abfdb028a67b5a62dc6e34af6fc59/sources/iTermTextDrawingHelper.m#L9

…ence that can do 11, 12 based on the number of arguments - this allows a single OSC call to set foreground, background and cursor in one go
…lication for steady vs blink, and the style of the cursor: block, underline or bar
…e view is removed from its superview, and when it comes back from the background
…ctive, and resume it when we become the first responder again; Also the out-of-focus cursor looked ugly, too thick, so make it thinner
… it is still missing the cursor adjustments and the panning handler is disabled for now, as it conflicts with the UIScrollView one
…l view, only install it when it is needed. This is necessary for the upcoming UIScrollView support
…l view, only install it when it is needed. This is necessary for the upcoming UIScrollView support
…on changes to the display, and instead it draws every time the contents from the primary data. Avoids the redraw bug entirely, but also, this cache is likely better somewhere else, without the cricularlist that might or might not be loaded
… are outside the sRGB color gamut. I clamp those values to the sRGB space for the terminal
…s the attrStrBuffer cache, which can get out of sync with the display needs. Removing this reduces some complexity, and also lets me tune separately some code later
migueldeicaza and others added 27 commits May 9, 2023 08:46
Use weak ref to fix crash when process exits after view is released
migueldeicaza#294

It seems like the problem is the use of the convenience DispatchQueue
read/write APIs that use a file descriptor as a parameter.  They would
stop delivering data even if data was avaialble, blocking the child
process.

I created a dedicated channel for reading and it works fine now (might
consider doing this for writing to).

Additionally, there is a new dispatchQueue introduced, this is not
necessary to fix this particular bug, but while I was testing, I
noticed a nicer scrolling behavior with a lot of output if I received
the data on a queue, and then dispatched the results to the main queue
than if I processed this directly in the main queue, which had a
visual behavior of "waves".
…Delegate open, so users can override these methods
* Fix yaml indentation
* Fix iOS build
* Remove unnecessary steps about submodule
* Remove duplicated "DEVELOPER_DIR" env
* Update checkout-action version
* Specify python27 path for testing
…for chWidth == 0, but other terminals are advancing even in the presence of a zero
…d ever happen after setting and limiting a font size between 5 and 72, but this prevents a crash
`inputAccessoryView` and `inputAssistantItem` are not available.
Fix visionOS build on latest beta SDK
the drawing is ok, but selection has some issues
…dy380743909/SwiftTerm into bugfix/issue_227_chinese_char_chopped
@andy380743909 andy380743909 deleted the bugfix/issue_227_chinese_char_chopped branch October 24, 2023 10:31
@andy380743909 andy380743909 restored the bugfix/issue_227_chinese_char_chopped branch October 24, 2023 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants