Re: Last attempt to fix XIM
>>sorry i could understand because my poor englsh.Thanks.
>>please explain more easy.
>>do you say that we must not use "force"?
>>to back vim58, we must not check xim_is_active in xim_set_focus().
>In Vim 5.8 there was a check for being in Normal mode. When in Normal
>mode, XIM was not activated. Now in 6.0 we use xim_is_active instead of
>this check for Normal mode. xim_is_active is set when going from Normal
>mode to Insert mode and it is reset when going from Insert mode to
>Normal mode. Thus xim_is_active has the same meaning as the old
>check for being in Normal mode:
> Normal mode: xim_is_active == FALSE
> Insert mode: xim_is_active == TRUE
>This requires 'iminsert' to be 2, which is the default. Thus when using
>xim_is_active instead of checking being in Normal mode, we should get
>the same behavior.
>The code I quoted above to check "xim_input_style" or "input_style" was
>used additionally. It looks like when preediting is used, according to
>this check, XIM would remain active in Normal mode. Thus in Vim 6.0
>xim_is_active might have to be TRUE when the above check is true. But
>this should be verified.
> X = (input_style indicates preediting);
> Normal mode && X == FALSE: xim_is_active == FALSE
> Normal mode && X == TRUE: xim_is_active == TRUE
> Insert mode: xim_is_active == TRUE
>The patch for Vim 6.0ax (without other patches) could be this:[snip]
>Please check if this fixes your problem. Keep 'iminsert' at 2. Settingyes this fixes problem.
>it to 0 should disable XIM, although with the above patch and preediting
>is used (X is TRUE) it will be enabled anyway. That is why I hesitate
>to include this, it will probably break it for some people.
but "input_style" is not real time variable.
thus we can start preediting any time.
and though if iminsert is 0, we can also do it.
active will be TRUE anyway.
is this ok?
and now i can't test gtk version.
is there who can test this with japanese xim?
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
- Yasuhiro Matsumoto wrote:
> >The patch for Vim 6.0ax (without other patches) could be this:Yes, the patch will cause the XIM to be active at all times. Even when
> >Please check if this fixes your problem. Keep 'iminsert' at 2. Setting
> >it to 0 should disable XIM, although with the above patch and preediting
> >is used (X is TRUE) it will be enabled anyway. That is why I hesitate
> >to include this, it will probably break it for some people.
> yes this fixes problem.
> but "input_style" is not real time variable.
> thus we can start preediting any time.
> and though if iminsert is 0, we can also do it.
> active will be TRUE anyway.
> is this ok?
> and now i can't test gtk version.
> is there who can test this with japanese xim?
'iminsert' is zero. Only setting 'imdisable' will switch off XIM then.
It would be better to find another solution, but I do not know how to
Since you reported this problem only for the non-GTK version, we should
probably only use this hack for when FEAT_GUI_GTK is not defined.
So here is the patch as I have it now. Please verify this still solves
the problem for you. Suggestions from others are also welcome, of
*** ../../vim60ax.20/src/mbyte.c Wed Sep 19 16:57:43 2001
--- mbyte.c Wed Sep 26 13:42:00 2001
*** 2730,2737 ****
--- 2730,2745 ----
if (xic == NULL)
+ /* If 'imdisable' is set, XIM is never active. */
active = FALSE;
+ #ifndef FEAT_GUI_GTK
+ else if (input_style & XIMPreeditPosition)
+ /* There is a problem in switching XIM off when preediting is used,
+ * and it is not clear how this can be solved. For now, keep XIM on
+ * all the time, like it was done in Vim 5.8. */
+ active = TRUE;
/* Remember the active state, it is needed when Vim gets keyboard focus. */
xim_is_active = active;
*** 2815,2821 ****
--- 2823,2829 ----
A)bort, R)etry, P)lease don't bother me again
/// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
\\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///