GNOME Bugzilla – Bug 608225
GtkHtml doesn't deal well with not constant value of cursor_pos in function call gtk_im_context_get_preedit_string from ibus input method framework.
Last modified: 2017-02-09 13:37:24 UTC
Created attachment 152382 [details] [review] Patch to remember the changed cursor_pos and change it back before html_engine_paste_text/commit. In the past, input method framework like scim never change the cursor_pos value of function call gtk_im_context_get_preedit_string. In scim, the cursor of preedit text is marked by using a black background color (use pango attr) to mark the cursor, and don't change cursor_pos value from the function gtk_im_context_get_preedit_string. But with ibus 1.2.0 and ibus-pinyin 1.2.99, the new input method framework start to use the cursor_pos, and return not constant and sometimes non-zero value. I checked gtkhtml code, it seems that when receive the non-zero value from get_preedit_string, it will move cursor immediately. And when im_context commit the preedit string, the cursor has been moved some characters forwards, move forward than the actual input position. The new input will show some characters later than the right position. See bug report: http://code.google.com/p/ibus/issues/detail?id=739 I made the patch and test it, by using a git clone from git.gnome.org. The patch will remember the sum of cursor_pos, and will move the cursor backward before html_engine_paste. Please review the patch, thanks.
Any progress on this bug report ? :( It is really annoying and stops me from using evolution normally.
Some people under Gentoo seems to be also affected by this: http://bugs.gentoo.org/show_bug.cgi?id=308591
Can anybody take a look on this? Seems that 3.32 could still require this. Thanks
Comment on attachment 152382 [details] [review] Patch to remember the changed cursor_pos and change it back before html_engine_paste_text/commit. [Setting "patch" flag and correcting mime type so this can actually be queried for.]
GtkHtml is not under active development anymore. Evolution (its main consumer) switched to a WebKit backend a while ago. It is currently unlikely that there will be any further GtkHtml development. Closing this report as WONTFIX as part of Bugzilla Housekeeping (bug 778387) to reflect reality. Please feel free to reopen this bug report in the future if anyone takes the responsibility for active development again.