-
-
Notifications
You must be signed in to change notification settings - Fork 86
FvwmForm: process UTF-8 input and paste request in input fields #1212
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
Conversation
To make FvwmForm input fields UTF-8 aware, input.size field is duplicated as input.width, the first one containing size in bytes and the latter width in multibyte chars. To allow walking along a string with chars of different lengths (1 to 4 bytes), e.g., for pasting or moving a cursor by arrow keys or by a mouse click, a helper function find_nth_UTF8_char() is introduced.
…ke this into account on restart.
|
@ThomasAdam @somiaj No more places affected by "multibyteness" found. Testing shows no problems. Please review. |
|
@ONykyf -- Thanks for this. It looks OK, although I'm not going to get time to properly look at it until later on the week. Other than my very small nits I've identified, I think we can probably improve on the logic in a few areas, but I'll wait until I've had change to go over those properly. |
…ocate mouse click faster, and translate labels with Gettext
|
This PR is getting there, still with comments from me which need addressing. I'm still not completely happy with the state of things overall though, but it's a convoluted mess and this is probably going to have to be good enough, but I suspect I'll merge this once you've finished addressing things, and then tidy it up afterward. |
|
Hope now the logic of the helper function is more straightforward and manageable enough by whoever will do this in the future. |
|
Removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be squashed into a previous commit as it's not introducing anything new.
|
@ThomasAdam Unsafe In fact getpwuid.c also contains |
No thanks. I don't think we need this.
getpwuid.c is a compat file found elsewhere, it's not changing to fit in with any wrapper functions. The point of the You may as well just remove this latest commit, and make the following adjustment: I also think we need to look at |
Done
|
|
@ThomasAdam Are there any more adjustments to be made? |
To make FvwmForm input fields UTF-8 aware, input.size field is duplicated as input.width, the first one containing size in bytes and the latter width in multibyte chars. To allow walking along a string with chars of different lengths (1 to 4 bytes), e.g., for pasting or moving a cursor by arrow keys or by a mouse click, a helper function find_nth_UTF8_char() is introduced.
Fixes #1211