Loading ...
Sorry, an error occurred while loading the content.

Re: Vim version 6.0ak ALPHA available [patch]

Expand Messages
  • Bram Moolenaar
    ... OK, thus the value of xim_preediting is invalid when not use the OnTheSpot method. ... I was trying to find a way to do it correctly in all situations.
    Message 1 of 7 , Jun 21, 2001
    • 0 Attachment
      Nam SungHyun wrote:

      > > Are the above correct when not use OnTheSpot then? It seems that when
      > > using one of the other metheds, xim_preediting doesn't matter, thus
      > > xim_has_focus has to be used to decide if the user was typing English or
      > > not.
      >
      > Only OnTheSpot can detect current language (Using preedit callback).
      > The other method cannot detect current language now. I guess
      > Muraoka mentioned about this before.

      OK, thus the value of xim_preediting is invalid when not use the OnTheSpot
      method.

      > > Something like:
      > >
      > > im_get_status()
      > > {
      > > if (using OnTheSpot)
      > > return xim_preediting && xim_has_focus;
      > > else
      > > return xim_has_focus;
      > > }
      > >
      > > Would that work correctly?
      >
      > If you don't like my patch, then how about just do
      >
      > im_get_status()
      > {
      > return xim_has_focus;
      > }
      >
      > Then, at least VIM can always connect to XIM. Though the ColorIM is not
      > usable.

      I was trying to find a way to do it correctly in all situations. This
      requires that we are able to know whether the OnTheSpot method is being used
      or not. When it is used, we can check the value of xim_preediting. When it
      is not used, we should just use xim_has_focus.

      The next thing to do is find some way to enable XIM from Insert mode when it
      was disabled by 'iminsert' being zero. With CTRL-^ it's possible to switch
      langmap on/off. Perhaps some other command should switch XIM on/off?

      However, when using OnTheSpot, the switching can be done inside XIM. Thus we
      should always connect to XIM and use 'iminsert' to set the mode to English or
      language. This requires being able to detect OnTheSpot method and setting the
      mode.

      > I found ONE more problem. VIM does not connect to XIM when I typed ':'.

      I think that's the same problem as in Insert mode. For a ":" command line you
      are expected to start typing a range and a command name. Thus you always
      start in English mode. But further on you might want to type something in
      your language. Then we need some command to switch XIM on.

      > > I think it should be consistent. If the cursor color shows using IM
      > > then the mode message should do the same.
      >
      > There already exists in-consistent. Win32 version always connect to IM
      > server. X version does not always connect to XIM. Because of this
      > reason, I believe my patch is a good solution at this time.
      >
      > I think The problem is VIM try to select language automatically, and
      > XIM does not like it.

      It's not easy, but hopefully we manage to make it work and make users happy!

      --
      The chat program is in public domain. This is not the GNU public license.
      If it breaks then you get to keep both pieces.
      -- Copyright notice for the chat program

      /// 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 ///
    • Nam SungHyun
      ... It seems you don t understand correctly? If the switching means the language mode, then the other method is same. The switching can be done inside XIM.
      Message 2 of 7 , Jun 21, 2001
      • 0 Attachment
        Bram Moolenaar wrote:
        >
        > Nam SungHyun wrote:
        >
        > > > Are the above correct when not use OnTheSpot then? It seems that when
        > > > using one of the other metheds, xim_preediting doesn't matter, thus
        > > > xim_has_focus has to be used to decide if the user was typing English or
        > > > not.
        > >
        > > Only OnTheSpot can detect current language (Using preedit callback).
        > > The other method cannot detect current language now. I guess
        > > Muraoka mentioned about this before.
        >
        > OK, thus the value of xim_preediting is invalid when not use the OnTheSpot
        > method.
        >
        > > > Something like:
        > > >
        > > > im_get_status()
        > > > {
        > > > if (using OnTheSpot)
        > > > return xim_preediting && xim_has_focus;
        > > > else
        > > > return xim_has_focus;
        > > > }
        > > >
        > > > Would that work correctly?
        > >
        > > If you don't like my patch, then how about just do
        > >
        > > im_get_status()
        > > {
        > > return xim_has_focus;
        > > }
        > >
        > > Then, at least VIM can always connect to XIM. Though the ColorIM is not
        > > usable.
        >
        > I was trying to find a way to do it correctly in all situations. This
        > requires that we are able to know whether the OnTheSpot method is being used
        > or not. When it is used, we can check the value of xim_preediting. When it
        > is not used, we should just use xim_has_focus.
        >
        > The next thing to do is find some way to enable XIM from Insert mode when it
        > was disabled by 'iminsert' being zero. With CTRL-^ it's possible to switch
        > langmap on/off. Perhaps some other command should switch XIM on/off?
        >
        > However, when using OnTheSpot, the switching can be done inside XIM.

        It seems you don't understand correctly?
        If 'the switching' means the language mode, then the other method is
        same. The switching can be done inside XIM. But VIM cannot know the
        language mode for the other method.

        > Thus we should always connect to XIM and use 'iminsert' to set the
        > mode to English or language. This requires being able to detect
        > OnTheSpot method and setting the mode.
        >
        > > I found ONE more problem. VIM does not connect to XIM when I typed ':'.
        >
        > I think that's the same problem as in Insert mode. For a ":" command line you
        > are expected to start typing a range and a command name. Thus you always
        > start in English mode. But further on you might want to type something in
        > your language. Then we need some command to switch XIM on.
        >
        > > > I think it should be consistent. If the cursor color shows using IM
        > > > then the mode message should do the same.

        Because VIM cannot know the language mode for 'the other method',
        I prefer VIM works like as before (VIM 6.0aj) for XIM version.
        How about not define 'USE_IM_CONTROL(?)' for FEAT_XIM?

        > > There already exists in-consistent. Win32 version always connect to IM
        > > server. X version does not always connect to XIM. Because of this
        > > reason, I believe my patch is a good solution at this time.
        > >
        > > I think The problem is VIM try to select language automatically, and
        > > XIM does not like it.
        >
        > It's not easy, but hopefully we manage to make it work and make users happy!

        Regards,
        namsh
      Your message has been successfully submitted and would be delivered to recipients shortly.