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

[vim-multibyte] Re: Special multibyte in menu is not displayed correctly

Expand Messages
  • Taro Muraoka
    ... Yes, indeed to use is_dbcs is better way. But there is one very very small problem and question. If multibyte menu user did not set fileencoding before
    Message 1 of 5 , Jan 15, 2000
      Bram Moolenaar wrote:
      > I suspect this can cause problems when using 8-bit characters in a menu. I
      > think it's better to use is_dbcs here, even though that's actually for buffer
      > text. How about this patch instead:
      >
      > *** ../vim-5.6a.28/src/menu.c Mon Dec 20 09:59:12 1999
      > --- src/menu.c Sat Jan 15 21:24:15 2000
      > ***************
      > *** 1010,1021 ****
      > --- 1010,1027 ----
      > char_u *p;
      >
      > for (p = name; *p && *p != '.'; p++)
      > + {
      > if (*p == '\\' || *p == Ctrl('V'))
      > {
      > mch_memmove(p, p + 1, STRLEN(p));
      > if (*p == NUL)
      > break;
      > }
      > + #ifdef MULTI_BYTE
      > + else if (is_dbcs && IsLeadByte(*p) && p[1] != NUL)
      > + ++p; /* skip multibyte char */
      > + #endif
      > + }
      > if (*p)
      > *p++ = NUL;
      > return p;


      Yes, indeed to use is_dbcs is better way. But there is one very very small
      problem and question. If multibyte menu user did not set 'fileencoding' before
      menu.vim was loaded, buffer would be initialized wrong. In this case user lose
      all chances to correct this. Menu is not updated, even if user type ":set
      fe=japan" in vim session.

      Of cource it is one easy solution that distribute multibyte menu.vim with a
      comment "WARNING: Do not forget to set 'fileencoding' option in your _vimrc.
      Just add line 'set fe=japan' in your _vimrc". Anoter way, at top of multibyte
      menu.vim distribute, add "set fe=japan". Or is there any good way to reload
      menu buffer?

      Post script...
      Screen shot of gVim with Japanese menu is available here.
      http://ixeris.bios.ics.saitama-u.ac.jp/~koron/software/img/gvim-5.6a.21-00.gif
      ----
      Taro Muraoka koron@...


      ----
      Taro Muraoka mailto:koron@...
    • Sven Guckes
      ... Now available on the Vim Picture Page: page: http://www.math.fu-berlin.de/~guckes/vim/pics.html#muraoka page: http://www.vim.org/pics.html#muraoka link:
      Message 2 of 5 , Jan 17, 2000
        * Taro Muraoka <koron@...> [000116 07:24]:
        > Screen shot of gVim with Japanese menu is available here.
        > http://ixeris.bios.ics.saitama-u.ac.jp/~koron/software/img/gvim-5.6a.21-00.gif

        Now available on the Vim Picture Page:
        page: http://www.math.fu-berlin.de/~guckes/vim/pics.html#muraoka
        page: http://www.vim.org/pics.html#muraoka
        link: http://www.vim.org/pics/muraoka.gvim-5.6a-jp.gif

        Is this ok with you, Muraoka-san?

        Sven

        --
        Sven Guckes@... VIM Picture Gallery
        VIM PICS Buttons and Logos: http://www.vim.org/pics.html#icons
        VIM PICS Screenshots: http://www.vim.org/pics.html#screenshots
        VIM PICS Got a cool picture of your editing enviornment to share? Send it!
      • Taro Muraoka
        ... Yes of cource. ... Taro Muraoka koron@tka.att.ne.jp
        Message 3 of 5 , Jan 17, 2000
          > Now available on the Vim Picture Page:
          > page: http://www.math.fu-berlin.de/~guckes/vim/pics.html#muraoka
          > page: http://www.vim.org/pics.html#muraoka
          > link: http://www.vim.org/pics/muraoka.gvim-5.6a-jp.gif
          >
          > Is this ok with you, Muraoka-san?

          Yes of cource.
          ----
          Taro Muraoka koron@...
        Your message has been successfully submitted and would be delivered to recipients shortly.