# I failed in sending this mail.  I'll resend it.

This is old subject but I think this report might help someone.

When using GTK2 GUI and XIM and GTK_IM_MODULE=scim, one undo command undoes
several insert command because undo sequence is not broken.  And also it
causes error E438.  This is because ...
1. scim doesn't invoke im_preedit_start_cb() and im_preedit_end_cb(), so the
  xim_has_preediting can be reset in im_preedit_changed_cb() only.
2. To delete preedit, scim invoke im_preedit_changed_cb() with empty
  preedit string only one time.  But at the time preedit_start_col is not
  MAXCOL and xim_is_preediting is not reset.
Therefore xim_is_preediting is always TRUE and undo sequence is not broken
(u_sync() is canceled).

This problem can be avoided to use OverTheSpot instead of OnTheSpot (this
can be set with scim-setup), or to set environment variables,
GTK_IM_MODULE=xim and [EMAIL PROTECTED], or to use the following patch.
The code around there was added at 6.2.451.  I don't understand why checking
if preedit_start_col is MAXCOL.  I think that the line can be removed.


*** mbyte.c.orig        Mon Aug 28 17:19:28 2006
--- mbyte.c     Mon Aug 28 17:19:30 2006
***************
*** 3741,3748 ****
     }
     else if (cursor_index == 0 && preedit_string[0] == '\0')
     {
!       if (preedit_start_col == MAXCOL)
!           xim_has_preediting = FALSE;
/* If at the start position (after typing backspace)
         * preedit_start_col must be reset. */
--- 3741,3747 ----
     }
     else if (cursor_index == 0 && preedit_string[0] == '\0')
     {
!       xim_has_preediting = FALSE;
/* If at the start position (after typing backspace)
         * preedit_start_col must be reset. */


-- Yukihiro Nakadaira <[EMAIL PROTECTED]>

Reply via email to