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

uneven splitting of codepoints #36

Closed
markroxor opened this issue Aug 28, 2017 · 3 comments
Closed

uneven splitting of codepoints #36

markroxor opened this issue Aug 28, 2017 · 3 comments
Assignees

Comments

@markroxor
Copy link

correct
jumbled

As per the above screenshots the codepoints on the edges of the terminal session are messed up because the number of columns "breaks-through" the code points.

@jarun
Copy link
Owner

jarun commented Aug 28, 2017

Copying from our earlier email conversation:

I think we need to check if the codepoint at COL is valid or not. If not, try the prev one and so on...
The function mblen() might be of help (no need to do a wchar conversion).

@markroxor
Copy link
Author

I figured out the actual length of the file name (including the MB length). How can we decide that while resizing the terminal the string should break at a particular code point? any ideas/?

@jarun
Copy link
Owner

jarun commented Aug 29, 2017

I think you need to keep checking for valid codepoints (using mblen) till it exceeds the total length of the columns.

@jarun jarun closed this as completed in 1e5a0b8 Sep 1, 2017
@lock lock bot locked and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants