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

Re: XIM input status in vim6.0 [test patch]

Expand Messages
  • Nam SungHyun
    ... How about like this? Regards, namsh diff -u -p -r1.4 mbyte.c ... +++ ./mbyte.c 21 Apr 2001 00:29:38 -0000 @@ -2264,6 +2264,7 @@ static int
    Message 1 of 6 , Apr 20, 2001
      Bram Moolenaar wrote:
      >
      > Steven Mueller wrote:
      >
      > > I decided to look into setting up a vim variable v:preediting
      > > (probably not the best of names...). Getting this working wasn't
      > > difficult, but I can't seem to get the status line to refresh when
      > > preedit mode is activated or deactivated.
      >
      > Thanks for looking into this. I'm not sure if using a v: variable for
      > this is the best choice, but we can think about that later.

      How about like this?

      Regards,

      namsh

      diff -u -p -r1.4 mbyte.c
      --- ./mbyte.c 17 Apr 2001 00:42:33 -0000 1.4
      +++ ./mbyte.c 21 Apr 2001 00:29:38 -0000
      @@ -2264,6 +2264,7 @@ static int status_area_enabled = TRUE;
      static int xim_input_style;
      static gboolean use_status_area = 0;
      #endif
      +int xim_preediting = 0;

      void
      xim_set_focus(int focus)
      @@ -2925,6 +2926,12 @@ xim_decide_input_style()
      static void
      preedit_start_cbproc(XIC xic, XPointer client_data, XPointer call_data)
      {
      + xim_preediting = TRUE;
      + if (showmode())
      + {
      + setcursor();
      + out_flush();
      + }
      }

      static void
      @@ -3043,6 +3050,12 @@ preedit_caret_cbproc(XIC xic, XPointer c
      static void
      preedit_done_cbproc(XIC xic, XPointer client_data, XPointer call_data)
      {
      + xim_preediting = FALSE;
      + if (showmode())
      + {
      + setcursor();
      + out_flush();
      + }
      }

      void
      diff -u -p -r1.20.2.1 screen.c
      --- ./screen.c 18 Apr 2001 06:25:24 -0000 1.20.2.1
      +++ ./screen.c 21 Apr 2001 00:30:10 -0000
      @@ -7142,6 +7142,13 @@ showmode()
      if (do_mode)
      {
      MSG_PUTS_ATTR("--", attr);
      +#if defined(FEAT_XIM)
      + {
      + extern int xim_preediting;
      + if (xim_preediting)
      + MSG_PUTS_ATTR(" XIM", attr);
      + }
      +#endif
      #if defined(FEAT_HANGULIN) && defined(FEAT_GUI)
      if (gui.in_use)
      {
    • Bram Moolenaar
      ... Yes, I prefer this above using the statusline, because the statusline isn t always present. Still, when editing the command line there is no mode shown.
      Message 2 of 6 , Apr 21, 2001
        Nam SungHyun wrote:

        > Bram Moolenaar wrote:
        > >
        > > Steven Mueller wrote:
        > >
        > > > I decided to look into setting up a vim variable v:preediting
        > > > (probably not the best of names...). Getting this working wasn't
        > > > difficult, but I can't seem to get the status line to refresh when
        > > > preedit mode is activated or deactivated.
        > >
        > > Thanks for looking into this. I'm not sure if using a v: variable for
        > > this is the best choice, but we can think about that later.
        >
        > How about like this?

        Yes, I prefer this above using the statusline, because the statusline isn't
        always present.

        Still, when editing the command line there is no mode shown. This probably
        does require doing something with the cursor (color or shape). Or is there
        another way?

        I'll include this patch for now, we can further improve it later. I'll move
        the global variable to globals.h.

        --
        Microsoft's definition of a boolean: TRUE, FALSE, MAYBE
        "Embrace and extend"...?

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      Your message has been successfully submitted and would be delivered to recipients shortly.