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

[60ad,mb] trailbyte of menu string

Expand Messages
  • Muraoka Taro
    Using vim with multibyte menu, there are a little problem. If menu path includes multibyte character that trail byte is and it generates detachable menu,
    Message 1 of 1 , May 1, 2001
    • 0 Attachment
      Using vim with multibyte menu, there are a little problem. If menu path
      includes multibyte character that trail byte is '\' and it generates
      detachable menu, then illegal additional detachable menu is added. I have
      fixed this problem with attached patch. Please check it.
      ----
      Muraoka Taro <koron@...>


      diff -cr src.orig/menu.c src/menu.c
      *** src.orig/menu.c Fri Apr 27 05:49:57 2001
      --- src/menu.c Mon Apr 30 19:56:54 2001
      ***************
      *** 519,529 ****
      --- 519,536 ----
      STRCPY(tearpath, menu_path);
      idx = next_name - path_name - 1;
      for (s = tearpath; *s && s < tearpath + idx; ++s)
      + {
      if ((*s == '\\' || *s == Ctrl_V) && s[1])
      {
      ++idx;
      ++s;
      }
      + #ifdef FEAT_MBYTE
      + /* skip multibyte char */
      + if (has_mbyte)
      + s += (*mb_ptr2len_check)(s) - 1;
      + #endif
      + }
      tearpath[idx] = NUL;
      gui_add_tearoff(tearpath, pri_tab, pri_idx);
      vim_free(tearpath);
    Your message has been successfully submitted and would be delivered to recipients shortly.