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

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

Expand Messages
  • Nam SungHyun
    Apr 20, 2001
    • 0 Attachment
      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)
      {
    • Show all 6 messages in this topic