Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vim-multibyte · Vim (Vi IMproved) text editor special language list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 149 - 178 of 2762   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#149 From: "Taro Muraoka" <koron@...>
Date: Mon Jan 17, 2000 11:35 am
Subject: Re: Gvim Japanese screenshot now on picture page
koron@...
Send Email Send Email
 
> 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@...

#150 From: Yasuhiro Matsumoto <matsu@...>
Date: Thu Jan 20, 2000 1:17 am
Subject: IME have better use same font as GUI
matsu@...
Send Email Send Email
 
Hello

I think...
IME have better use same font as GUI.

If I select "Select Font" from menu,
   ( or type ":set gfn=*")
then vim show ChooseFont  two times for
a reason that it select GUI font and IME font.

So , I made patch.

Problem: Vim show font dialog two times.
Solution: IME use same font as GUI.
Files:     src/gui_w32.c

*** src/gui_w32.c.orig Mon Jan 17 01:42:02 2000
--- src/gui_w32.c Thu Jan 20 10:13:01 2000
***************
*** 2641,2647 ****
       if (font_name == NULL)
    font_name = lf.lfFaceName;
   #ifdef MULTI_BYTE_IME
!     get_logfont(&norm_logfont, font_name);
   #endif
       gui_mch_free_font(gui.norm_font);
       gui.norm_font = font;
--- 2641,2648 ----
       if (font_name == NULL)
    font_name = lf.lfFaceName;
   #ifdef MULTI_BYTE_IME
!     //get_logfont(&norm_logfont, font_name);
!     mch_memmove(&norm_logfont, &lf, sizeof(LOGFONT));
   #endif
       gui_mch_free_font(gui.norm_font);
       gui.norm_font = font;

#151 From: Bram Moolenaar <Bram@...>
Date: Thu Jan 20, 2000 11:14 am
Subject: Re: IME have better use same font as GUI
Bram@...
Send Email Send Email
 
Yasuhiro Matsumoto wrote:

> I think...
> IME have better use same font as GUI.
>
> If I select "Select Font" from menu,
>   ( or type ":set gfn=*")
> then vim show ChooseFont  two times for
> a reason that it select GUI font and IME font.
>
> So , I made patch.

I can see why it goes wrong.  Looks like a good fix.

How about using:

	 norm_logfont = fh;

Instead of:

	 mch_memmove(&norm_logfont, &lf, sizeof(LOGFONT));

Is it OK to copy a LOGFONT?

--
GALAHAD:   Camelot ...
LAUNCELOT: Camelot ...
GAWAIN:    It's only a model.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

--/-/---- Bram Moolenaar ---- Bram@... ---- Bram@... ---\-\--
   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /

#152 From: Bram Moolenaar <Bram@...>
Date: Fri Jan 21, 2000 1:05 pm
Subject: Vim on LinuxWorld expo
Bram@...
Send Email Send Email
 
Hello Vimmers,

In the first week of February, there will be a LinuxWorld conference and expo
in New York city.  I will be there, in the Tucows booth.  There will be a
couple of presentations about Vim each day.  I'll be showing off Vim too.

If you attend LinuxWorld, stop by at the Tucows booth to say hello.
Teaser: We will be handing out free CDs! :-)

More information: http://www.linuxworldexpo.com

--
Linux is just like a wigwam: no Windows, no Gates and an Apache inside.

--/-/---- Bram Moolenaar ---- Bram@... ---- Bram@... ---\-\--
   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /

#153 From: Taro Muraoka <koron@...>
Date: Sat Jan 22, 2000 12:34 pm
Subject: easy calc COMPOSITIONFORM position
koron@...
Send Email Send Email
 
There is more easy and more extensible way to calc position of IME
composition window. How about this?
----
Taro Muraoka <koron@...>


Explain:    More easy way to calc position of IME composition window.
Files:     src/gui_w32.c


*** gui_w32.c.orig Sat Jan 22 18:11:42 2000
--- gui_w32.c Sat Jan 22 18:14:18 2000
***************
*** 3217,3233 ****
  	     {
  		 ImmSetCompositionFont(hImc, &norm_logfont);
  		 cf.dwStyle = CFS_POINT;
! 	 cf.ptCurrentPos.x = TEXT_X(gui.col) + gui.border_offset;
! 	 cf.ptCurrentPos.y = TEXT_Y(gui.row) + gui.border_offset;
! #ifdef WANT_MENU
! 	 if (gui.menu_is_active)
! 		    cf.ptCurrentPos.y += gui.menu_height;
! #endif
! #ifdef USE_TOOLBAR
! 	 if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
! 		    cf.ptCurrentPos.y +=
! 		 TOOLBAR_BUTTON_HEIGHT + TOOLBAR_BORDER_HEIGHT;
! #endif
  		 ImmSetCompositionWindow(hImc, &cf);
  	     }
  	     bImeNative = TRUE;
--- 3217,3225 ----
  	     {
  		 ImmSetCompositionFont(hImc, &norm_logfont);
  		 cf.dwStyle = CFS_POINT;
! 	 cf.ptCurrentPos.x = FILL_X(gui.col);
! 	 cf.ptCurrentPos.y = FILL_Y(gui.row);
! 	 MapWindowPoints( s_textArea, s_hwnd, &cf.ptCurrentPos, 1 );
  		 ImmSetCompositionWindow(hImc, &cf);
  	     }
  	     bImeNative = TRUE;

#154 From: Taro Muraoka <koron@...>
Date: Sat Jan 22, 2000 12:34 pm
Subject: IME font and compotision window
koron@...
Send Email Send Email
 
IME font is not changed when screen font is changed.
IME composition window does not trace cursor.

Please test.
----
Taro Muraoka <koron@...>


Problem:    IME font is not changed when screen font is changed. And IME
	 composition window does not trace cursor.
Solution:   Initialize IME font. And, when cursor is moved, set IME
	 composition window (add new function ImeSetCompotionWindow).
Files:     src/gui.c src/gui_w32.c src/proto/gui_w32.pro


diff -cr src.orig/gui.c src/gui.c
*** src.orig/gui.c Sun Jan 16 20:30:34 2000
--- src/gui.c Sat Jan 22 20:03:44 2000
***************
*** 683,688 ****
--- 683,692 ----
  	 gui_undraw_cursor();
  	 if (gui.row <0)
  	     return;
+ #if defined(MULTI_BYTE_IME) && defined(USE_GUI_MSWIN)
+  if (gui.row != gui.cursor_row || gui.col != gui.cursor_col)
+ 	    ImeSetCompositionWindow();
+ #endif
  	 gui.cursor_row = gui.row;
  	 gui.cursor_col = gui.col;
  	 gui.cursor_is_valid = TRUE;
diff -cr src.orig/gui_w32.c src/gui_w32.c
*** src.orig/gui_w32.c Sat Jan 22 15:20:36 2000
--- src/gui_w32.c Sat Jan 22 20:06:08 2000
***************
*** 2641,2646 ****
--- 2641,2655 ----
  	 font_name = lf.lfFaceName;
   #ifdef MULTI_BYTE_IME
       norm_logfont = lf;
+     {
+  /* Initialize font for IME */
+  HIMC    hImc;
+  if ((hImc = ImmGetContext(s_hwnd)))
+  {
+ 	    ImmSetCompositionFont( hImc, &norm_logfont );
+ 	    ImmReleaseContext( s_hwnd, hImc );
+  }
+     }
   #endif
       gui_mch_free_font(gui.norm_font);
       gui.norm_font = font;
***************
*** 3027,3039 ****


   /*
    * When enter to insert mode, set IME to previous language mode
    */
       void
   ImeSetOriginMode(void)
   {
       HIMC    hImc;
!     DWORD   dwConvMode, dwSentMode;

       if ((hImc = ImmGetContext(s_hwnd)))
       {
--- 3036,3068 ----


   /*
+  * Set IME composition window's position
+  */
+     void
+ ImeSetCompositionWindow(void)
+ {
+     HIMC hImc;
+     if ((hImc = ImmGetContext(s_hwnd)))
+     {
+  COMPOSITIONFORM cfs;
+  cfs.dwStyle = CFS_POINT;
+  cfs.ptCurrentPos.x = FILL_X(gui.col);
+  cfs.ptCurrentPos.y = FILL_Y(gui.row);
+  MapWindowPoints(s_textArea, s_hwnd, &cfs.ptCurrentPos, 1);
+  ImmSetCompositionWindow(hImc, &cfs);
+  ImmReleaseContext(s_hwnd, hImc);
+     }
+ }
+
+
+ /*
    * When enter to insert mode, set IME to previous language mode
    */
       void
   ImeSetOriginMode(void)
   {
       HIMC    hImc;
! /*    DWORD   dwConvMode, dwSentMode; /* no use */

       if ((hImc = ImmGetContext(s_hwnd)))
       {
***************
*** 3043,3048 ****
--- 3072,3078 ----
  	 }
  	 else
  	     bImeOpenStatus = FALSE;
+  ImmReleaseContext(s_hwnd, hImc);
       }
       bCommandMode = FALSE;
   }
***************
*** 3065,3070 ****
--- 3095,3101 ----
  	 }
  	 else
  	     bImeOpenStatus = FALSE;
+  ImmReleaseContext(s_hwnd, hImc);
       }
       bCommandMode = TRUE;
   }
***************
*** 3191,3196 ****
--- 3222,3228 ----
  	 if ((hImc = ImmGetContext(s_hwnd)))
  	 {
  	     ImmGetConversionStatus(hImc, &dwConvMode, &dwSentMode);
+ 	    ImmReleaseContext(s_hwnd, hImc);
  	     if ((dwConvMode & IME_CMODE_NATIVE))
  		 return lpCompStr;
  	 }
diff -cr src.orig/proto/gui_w32.pro src/proto/gui_w32.pro
*** src.orig/proto/gui_w32.pro Sun Jan 16 22:23:20 2000
--- src/proto/gui_w32.pro Sat Jan 22 20:03:44 2000
***************
*** 28,33 ****
--- 28,34 ----
   GuiColor gui_mch_get_color __ARGS((char_u *name));
   void gui_mch_set_fg_color __ARGS((GuiColor color));
   void gui_mch_set_bg_color __ARGS((GuiColor color));
+ void ImeSetCompositionWindow __ARGS((void));
   void ImeSetOriginMode __ARGS((void));
   void ImeSetEnglishMode __ARGS((void));
   void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int
flags));

#155 From: Bram Moolenaar <Bram@...>
Date: Sat Jan 22, 2000 7:11 pm
Subject: Re: IME font and compotision window
Bram@...
Send Email Send Email
 
Taro Muraoka wrote:

> IME font is not changed when screen font is changed.
> IME composition window does not trace cursor.
>
> Please test.

It looks OK (didn't compile it though).

It seems the computation of the position is now doubled.  Let's move it into a
function, so that it only appears once.  I'll include my alternative patch for
gui_w32.c below.

> +  ImmReleaseContext(s_hwnd, hImc);

Does this line also need to be added in ImeNotify()?  It does call
ImmGetContext(), shouldn't these always be called in pairs?

*** ../../vim-5.6.6/src/gui_w32.c Fri Jan 21 12:14:46 2000
--- gui_w32.c Sat Jan 22 17:59:39 2000
***************
*** 148,153 ****
--- 148,154 ----
   # define LPCTSTR int
   # define OSVERSIONINFO int
   # define HBRUSH  int
+ # define HIMC  int
   #endif

   /* For the Intellimouse: */
***************
*** 2641,2646 ****
--- 2642,2657 ----
  	 font_name = lf.lfFaceName;
   #ifdef MULTI_BYTE_IME
       norm_logfont = lf;
+     {
+  HIMC    hImc;
+
+  /* Initialize font for IME */
+  if ((hImc = ImmGetContext(s_hwnd)))
+  {
+ 	    ImmSetCompositionFont(hImc, &norm_logfont);
+ 	    ImmReleaseContext(s_hwnd, hImc);
+  }
+     }
   #endif
       gui_mch_free_font(gui.norm_font);
       gui.norm_font = font;
***************
*** 3025,3030 ****
--- 3036,3071 ----
       SetBkMode(s_hdc,OldBkMode);
   }

+ /*
+  * Position IME composition window.
+  */
+     static void
+ ImePositionWindow(HIMC hImc)
+ {
+     COMPOSITIONFORM cfs;
+
+     cfs.dwStyle = CFS_POINT;
+     cfs.ptCurrentPos.x = FILL_X(gui.col);
+     cfs.ptCurrentPos.y = FILL_Y(gui.row);
+     MapWindowPoints(s_textArea, s_hwnd, &cfs.ptCurrentPos, 1);
+     ImmSetCompositionWindow(hImc, &cfs);
+ }
+
+ /*
+  * Get context and position IME composition window.
+  */
+     void
+ ImeSetCompositionWindow(void)
+ {
+     HIMC hImc;
+
+     if ((hImc = ImmGetContext(s_hwnd)))
+     {
+  ImePositionWindow(hImc);
+  ImmReleaseContext(s_hwnd, hImc);
+     }
+ }
+

   /*
    * When enter to insert mode, set IME to previous language mode
***************
*** 3033,3048 ****
   ImeSetOriginMode(void)
   {
       HIMC    hImc;
-     DWORD   dwConvMode, dwSentMode;

       if ((hImc = ImmGetContext(s_hwnd)))
       {
  	 if (!ImmGetOpenStatus(hImc) && bImeOpenStatus == TRUE)
!  {
! 	 ImmSetOpenStatus(hImc, TRUE);
!  }
  	 else
  	     bImeOpenStatus = FALSE;
       }
       bCommandMode = FALSE;
   }
--- 3074,3087 ----
   ImeSetOriginMode(void)
   {
       HIMC    hImc;

       if ((hImc = ImmGetContext(s_hwnd)))
       {
  	 if (!ImmGetOpenStatus(hImc) && bImeOpenStatus == TRUE)
! 	    ImmSetOpenStatus(hImc, TRUE);
  	 else
  	     bImeOpenStatus = FALSE;
+  ImmReleaseContext(s_hwnd, hImc);
       }
       bCommandMode = FALSE;
   }
***************
*** 3065,3070 ****
--- 3104,3110 ----
  	 }
  	 else
  	     bImeOpenStatus = FALSE;
+  ImmReleaseContext(s_hwnd, hImc);
       }
       bCommandMode = TRUE;
   }
***************
*** 3191,3196 ****
--- 3231,3237 ----
  	 if ((hImc = ImmGetContext(s_hwnd)))
  	 {
  	     ImmGetConversionStatus(hImc, &dwConvMode, &dwSentMode);
+ 	    ImmReleaseContext(s_hwnd, hImc);
  	     if ((dwConvMode & IME_CMODE_NATIVE))
  		 return lpCompStr;
  	 }
***************
*** 3203,3209 ****
   {
       HIMC    hImc;
       DWORD   dwConvMode, dwSentMode;
-     COMPOSITIONFORM cf;

       if ((hImc = ImmGetContext(s_hwnd)))
       {
--- 3244,3249 ----
***************
*** 3213,3234 ****
  	     RECT t_rct;
  	     RECT w_rct;
  	     if (w = IMN_SETOPENSTATUS && GetWindowRect(s_textArea, &t_rct)
! 	 && GetWindowRect(s_hwnd, &w_rct))
  	     {
  		 ImmSetCompositionFont(hImc, &norm_logfont);
! 	 cf.dwStyle = CFS_POINT;
! 	 cf.ptCurrentPos.x = TEXT_X(gui.col) + gui.border_offset;
! 	 cf.ptCurrentPos.y = TEXT_Y(gui.row) + gui.border_offset;
! #ifdef WANT_MENU
! 	 if (gui.menu_is_active)
! 		    cf.ptCurrentPos.y += gui.menu_height;
! #endif
! #ifdef USE_TOOLBAR
! 	 if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
! 		    cf.ptCurrentPos.y +=
! 		 TOOLBAR_BUTTON_HEIGHT + TOOLBAR_BORDER_HEIGHT;
! #endif
! 	 ImmSetCompositionWindow(hImc, &cf);
  	     }
  	     bImeNative = TRUE;
  	 }
--- 3253,3262 ----
  	     RECT t_rct;
  	     RECT w_rct;
  	     if (w = IMN_SETOPENSTATUS && GetWindowRect(s_textArea, &t_rct)
! 		    && GetWindowRect(s_hwnd, &w_rct))
  	     {
  		 ImmSetCompositionFont(hImc, &norm_logfont);
! 	 ImePositionWindow(hImc);
  	     }
  	     bImeNative = TRUE;
  	 }
--
TALL KNIGHT: We shall say Ni! again to you if you do not appease us.
ARTHUR:      All right!  What do you want?
TALL KNIGHT: We want ... a shrubbery!
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

--/-/---- Bram Moolenaar ---- Bram@... ---- Bram@... ---\-\--
   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /

#156 From: Taro Muraoka <koron@...>
Date: Sun Jan 23, 2000 5:51 am
Subject: Re: IME font and compotision window
koron@...
Send Email Send Email
 
Bram Moolenaar wrote:

> It seems the computation of the position is now doubled.  Let's move it into a
> function, so that it only appears once.  I'll include my alternative patch for
> gui_w32.c below.

I compiled it. It works fine.

> > +  ImmReleaseContext(s_hwnd, hImc);
>
> Does this line also need to be added in ImeNotify()?  It does call
> ImmGetContext(), shouldn't these always be called in pairs?

Yes, it needs. There is alternative patch below.
----
Taro Muraoka <koron@...>


*** bram.patched.gui_w32.c Sun Jan 23 13:41:16 2000
--- gui_w32.c Sun Jan 23 14:27:12 2000
***************
*** 3250,3259 ****
  	 ImmGetConversionStatus(hImc, &dwConvMode, &dwSentMode);
  	 if (dwConvMode & IME_CMODE_NATIVE)
  	 {
! 	    RECT t_rct;
! 	    RECT w_rct;
! 	    if (w = IMN_SETOPENSTATUS && GetWindowRect(s_textArea, &t_rct)
! 		    && GetWindowRect(s_hwnd, &w_rct))
  	     {
  		 ImmSetCompositionFont(hImc, &norm_logfont);
  		 ImePositionWindow(hImc);
--- 3250,3256 ----
  	 ImmGetConversionStatus(hImc, &dwConvMode, &dwSentMode);
  	 if (dwConvMode & IME_CMODE_NATIVE)
  	 {
! 	    if (w = IMN_SETOPENSTATUS)
  	     {
  		 ImmSetCompositionFont(hImc, &norm_logfont);
  		 ImePositionWindow(hImc);
***************
*** 3262,3267 ****
--- 3259,3265 ----
  	 }
  	 else
  	     bImeNative = FALSE;
+  ImmReleaseContext(s_hwnd, hImc);
       }
   }

#157 From: Bram Moolenaar <Bram@...>
Date: Sun Jan 23, 2000 11:47 am
Subject: Re: IME font and compotision window
Bram@...
Send Email Send Email
 
Taro Muraoka wrote:

> > > +  ImmReleaseContext(s_hwnd, hImc);
> >
> > Does this line also need to be added in ImeNotify()?  It does call
> > ImmGetContext(), shouldn't these always be called in pairs?
>
> Yes, it needs. There is alternative patch below.

Good cleanup.  But it made me look closer at this line:

 	     if (w = IMN_SETOPENSTATUS)

The assignment doesn't have any effect.  Shouldn't that be:

 	     if (w == IMN_SETOPENSTATUS)

Please test if it still works then (I can't compile with IME support).

--
CONCORDE: Message for you, sir.
    He falls forward revealing the arrow with the note.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

--/-/---- Bram Moolenaar ---- Bram@... ---- Bram@... ---\-\--
   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /

#158 From: Taro Muraoka <koron@...>
Date: Sun Jan 23, 2000 12:36 pm
Subject: Re: IME font and compotision window
koron@...
Send Email Send Email
 
Bram Moolenaar wrote:

> Good cleanup.  But it made me look closer at this line:
>
>  	    if (w = IMN_SETOPENSTATUS)
>
> The assignment doesn't have any effect.  Shouldn't that be:
>
>  	    if (w == IMN_SETOPENSTATUS)
>
> Please test if it still works then (I can't compile with IME support).

Oh! yes. There was a bug in original gui_w32.c. I didn't notice that.
I have fixed this and compiled. It seems to work very good.
----
Taro Muraoka <koron@...>

#159 From: Yasuhiro Matsumoto <matsu@...>
Date: Mon Jan 24, 2000 6:32 am
Subject: Tearoff Menu use font given from System.
matsu@...
Send Email Send Email
 
If vim user want to use multibyte tearoff menu
then they must change source "gui_w32.c".

Example....

From:
   #define DLG_FONT_NAME "MS Sans Serif"
To:
   #define DLG_FONT_NAME ....   (possible font)

see screenshot

Original tearoff menu (japanesed)
   http://www.cis-net.co.jp/matsu/vim/work/original.jpg
Patched tearoff menu (japanesed)
   http://www.cis-net.co.jp/matsu/vim/work/patched.jpg

So I made patch.
I think that this patch support multilingual.
And if you change the system property of menu
then vim change too.
(but you must tear off the menu.)

----------------------------------------
Problem:    Tearoff menu possible use font that everyone doesn't have.
Solution:   Tearoff menu use font given from system.
Files:      src/gui_w32.c src/proto/gui_w32.pro

*** src/gui_w32.c.orig Mon Jan 17 01:42:02 2000
--- src/gui_w32.c Mon Jan 24 12:53:04 2000
***************
*** 162,167 ****
--- 162,169 ----
   static LOGFONT norm_logfont;
   #endif
   #endif
+ /* Use System Menu Font */
+ #define USE_SYSMENU_FONT

   /* Local variables: */
   static int  s_button_pending = -1;
***************
*** 2641,2647 ****
       if (font_name == NULL)
  	 font_name = lf.lfFaceName;
   #ifdef MULTI_BYTE_IME
!     get_logfont(&norm_logfont, font_name);
   #endif
       gui_mch_free_font(gui.norm_font);
       gui.norm_font = font;
--- 2643,2650 ----
       if (font_name == NULL)
  	 font_name = lf.lfFaceName;
   #ifdef MULTI_BYTE_IME
!     //get_logfont(&norm_logfont, font_name);
!     mch_memmove(&norm_logfont, &lf, sizeof(LOGFONT));
   #endif
       gui_mch_free_font(gui.norm_font);
       gui.norm_font = font;
***************
*** 4613,4618 ****
--- 4616,4635 ----
       "IDR_VIM_QUESTION"
   };

+ #ifdef USE_SYSMENU_FONT
+ /*
+  * Get Menu Font
+  */
+     LOGFONT*
+ gui_w32_get_menu_font()
+ {
+     static NONCLIENTMETRICS nm;
+     nm.cbSize = sizeof (NONCLIENTMETRICS);
+     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(
NONCLIENTMETRICS ), &nm, 0);
+     return &(nm.lfMenuFont);
+ }
+ #endif
+
       int
   gui_mch_dialog(
       int 	 type,
***************
*** 4643,4648 ****
--- 4660,4668 ----
       int  vertical;
       int  dlgPaddingX;
       int  dlgPaddingY;
+ #ifdef USE_SYSMENU_FONT
+     LOGFONT *sysmenu_logfont = NULL;
+ #endif

   #ifndef NO_CONSOLE
       /* Don't output anything in silent mode ("ex -s") */
***************
*** 4700,4707 ****
--- 4720,4732 ----
        */
       hwnd = GetDesktopWindow();
       hdc = GetWindowDC(hwnd);
+ #ifndef USE_SYSMENU_FONT
       font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
  		       VARIABLE_PITCH , DLG_FONT_NAME);
+ #else
+     sysmenu_logfont = gui_w32_get_menu_font();
+     font = CreateFontIndirect(sysmenu_logfont);
+ #endif
       if (s_usenewlook)
       {
  	 oldFont = SelectFont(hdc, font);
***************
*** 4837,4845 ****
--- 4862,4877 ----
       if (s_usenewlook)
       {
  	 /* do the font, since DS_3DLOOK doesn't work properly */
+ #ifndef USE_SYSMENU_FONT
  	 *p++ = DLG_FONT_POINT_SIZE;  //point size
  	 nchar = nCopyAnsiToWideChar (p, TEXT(DLG_FONT_NAME));
  	 p += nchar;
+ #else
+  /* point size */
+  *p++ = -MulDiv(sysmenu_logfont->lfHeight, 72, GetDeviceCaps(hdc,
LOGPIXELSY));
+  nchar = nCopyAnsiToWideChar (p, TEXT(sysmenu_logfont->lfFaceName));
+  p += nchar;
+ #endif
       }

       pstart = tbuffer;
***************
*** 5182,5187 ****
--- 5214,5222 ----
       char_u *label, *text, *end, *acEnd;
       int  padding0, padding1, padding2;
       int  sepPadding=0;
+ #ifdef USE_SYSMENU_FONT
+     LOGFONT *sysmenu_logfont = NULL;
+ #endif

       /*
        * If this menu is already torn off, then don't
***************
*** 5215,5222 ****
--- 5250,5262 ----

       hwnd = GetDesktopWindow();
       hdc = GetWindowDC(hwnd);
+ #ifndef USE_SYSMENU_FONT
       font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
  		       VARIABLE_PITCH , DLG_FONT_NAME);
+ #else
+     sysmenu_logfont = gui_w32_get_menu_font();
+     font = CreateFontIndirect(sysmenu_logfont);
+ #endif
       if (s_usenewlook)
  	 oldFont = SelectFont(hdc, font);
       else
***************
*** 5315,5323 ****
--- 5355,5370 ----
       if (s_usenewlook)
       {
  	 /* do the font, since DS_3DLOOK doesn't work properly */
+ #ifndef USE_SYSMENU_FONT
  	 *p++ = DLG_FONT_POINT_SIZE;  //point size
  	 nchar = nCopyAnsiToWideChar (p, TEXT(DLG_FONT_NAME));
  	 p += nchar;
+ #else
+  /* point size */
+  *p++ = -MulDiv(sysmenu_logfont->lfHeight, 72, GetDeviceCaps(hdc,
LOGPIXELSY));
+  nchar = nCopyAnsiToWideChar (p, TEXT(sysmenu_logfont->lfFaceName));
+  p += nchar;
+ #endif
       }

       /* Don't include tearbar in tearoff menu */
***************
*** 5447,5452 ****
--- 5494,5502 ----
       HFONT     hfontTools = 0;
       DWORD     dlgFontSize;
       SIZE     size;
+ #ifdef USE_SYSMENU_FONT
+     LOGFONT     *sysmenu_logfont = NULL;
+ #endif

       s_usenewlook = FALSE;

***************
*** 5456,5463 ****
--- 5506,5518 ----
        */
       if (!is_winnt_3())
       {
+ #ifndef USE_SYSMENU_FONT
  	 hfontTools = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
  				 0, 0, 0, 0, VARIABLE_PITCH , DLG_FONT_NAME);
+ #else
+     sysmenu_logfont = gui_w32_get_menu_font();
+     hfontTools = CreateFontIndirect(sysmenu_logfont);
+ #endif

  	 if (hfontTools)
  	 {
*** src/proto/gui_w32.pro.orig Mon Jan 24 12:59:07 2000
--- src/proto/gui_w32.pro Mon Jan 24 12:59:53 2000
***************
*** 67,69 ****
--- 67,70 ----
   void gui_mch_find_dialog __ARGS((char_u *arg));
   void gui_mch_replace_dialog __ARGS((char_u *arg));
   void gui_mch_mousehide __ARGS((int hide));
+ LOGFONT* gui_get_sysmenu_logfont __ARGS((void));

#160 From: Bram Moolenaar <Bram@...>
Date: Mon Jan 24, 2000 10:16 am
Subject: Re: Tearoff Menu use font given from System.
Bram@...
Send Email Send Email
 
Yasuhiro Matsumoto wrote:
> If vim user want to use multibyte tearoff menu
> then they must change source "gui_w32.c".
>
> Example....
>
> From:
>   #define DLG_FONT_NAME "MS Sans Serif"
> To:
>   #define DLG_FONT_NAME ....   (possible font)
>
> see screenshot
>
> Original tearoff menu (japanesed)
>   http://www.cis-net.co.jp/matsu/vim/work/original.jpg
> Patched tearoff menu (japanesed)
>   http://www.cis-net.co.jp/matsu/vim/work/patched.jpg
>
> So I made patch.
> I think that this patch support multilingual.
> And if you change the system property of menu
> then vim change too.
> (but you must tear off the menu.)

This is quite a big patch.  It looks OK to me, but I can't test it properly on
my USA Windows.  Please let me know if this works OK for you and perhaps
suggest improvements.

--
FATHER:    Did you kill all those guards?
LAUNCELOT: Yes ...  I'm very sorry ...
FATHER:    They cost fifty pounds each!
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\ \   Vim: http://www.vim.org      ICCF Holland: http://www.vim.org/iccf   / /

#161 From: Taro Muraoka <koron@...>
Date: Mon Jan 24, 2000 3:40 pm
Subject: Re: Tearoff Menu use font given from System.
koron@...
Send Email Send Email
 
I tested it. It is nice. But I have three questions.

First. Is this a problem of only multibyte users? It seems be a more global
problem that tear-off menu is not affected by system property. But I don't
know user (not only multibyte) would want to change font of tear-off menu.

Yasuhiro Matsumoto wrote:
> +     LOGFONT*
> + gui_w32_get_menu_font()
> + {
> +     static NONCLIENTMETRICS nm;

Second. Why is this function declared 'global'. It is OK to declare 'static'
isn't it?. If there is no need to declare global, nor be necessary to
change src/proto/gui_w32.pro.

Third. Why is 'nm' static. It seems better to take one argument pointer of
LOGFONT and to copy value of LOGFONT to that pointer.

I revise patch below. It make from 5.6.08 source code. How about this?.
----
Taro Muraoka <koron@...>


*** gui_w32.c.orig Mon Jan 24 07:38:16 2000
--- gui_w32.c Tue Jan 25 00:23:38 2000
***************
*** 155,160 ****
--- 155,161 ----
   #ifndef WM_MOUSEWHEEL
   #define WM_MOUSEWHEEL 0x20a
   #endif
+ #define USE_SYSMENU_FONT

   #ifdef MULTI_BYTE
   static int sysfixed_width = 0;
***************
*** 4638,4643 ****
--- 4639,4664 ----
       "IDR_VIM_QUESTION"
   };

+ #ifdef USE_SYSMENU_FONT
+ /*
+  * Get Menu Font
+  */
+     static int
+ gui_w32_get_menu_font(LOGFONT *lf)
+ {
+     NONCLIENTMETRICS nm;
+     nm.cbSize = sizeof(NONCLIENTMETRICS);
+     if (!SystemParametersInfo(
+ 	    SPI_GETNONCLIENTMETRICS,
+ 	    sizeof(NONCLIENTMETRICS),
+ 	    &nm,
+ 	    0))
+  return 0;
+     *lf = nm.lfMenuFont;
+     return 0;
+ }
+ #endif
+
       int
   gui_mch_dialog(
       int 	 type,
***************
*** 4668,4673 ****
--- 4689,4697 ----
       int  vertical;
       int  dlgPaddingX;
       int  dlgPaddingY;
+ #ifdef USE_SYSMENU_FONT
+     LOGFONT lfSysmenu;
+ #endif

   #ifndef NO_CONSOLE
       /* Don't output anything in silent mode ("ex -s") */
***************
*** 4725,4732 ****
--- 4749,4761 ----
        */
       hwnd = GetDesktopWindow();
       hdc = GetWindowDC(hwnd);
+ #ifdef USE_SYSMENU_FONT
+     gui_w32_get_menu_font(&lfSysmenu);
+     font = CreateFontIndirect(&lfSysmenu);
+ #else
       font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  		       VARIABLE_PITCH , DLG_FONT_NAME);
+ #endif
       if (s_usenewlook)
       {
  	 oldFont = SelectFont(hdc, font);
***************
*** 4862,4869 ****
--- 4891,4905 ----
       if (s_usenewlook)
       {
  	 /* do the font, since DS_3DLOOK doesn't work properly */
+ #ifdef USE_SYSMENU_FONT
+  /* point size */
+  *p++ = -MulDiv(lfSysmenu.lfHeight, 72,
+ 	 GetDeviceCaps(hdc, LOGPIXELSY));
+  nchar = nCopyAnsiToWideChar(p, TEXT(lfSysmenu.lfFaceName));
+ #else
  	 *p++ = DLG_FONT_POINT_SIZE;  //point size
  	 nchar = nCopyAnsiToWideChar (p, TEXT(DLG_FONT_NAME));
+ #endif
  	 p += nchar;
       }

***************
*** 5207,5212 ****
--- 5243,5251 ----
       char_u *label, *text, *end, *acEnd;
       int  padding0, padding1, padding2;
       int  sepPadding=0;
+ #ifdef USE_SYSMENU_FONT
+     LOGFONT lfSysmenu;
+ #endif

       /*
        * If this menu is already torn off, then don't
***************
*** 5240,5247 ****
--- 5279,5291 ----

       hwnd = GetDesktopWindow();
       hdc = GetWindowDC(hwnd);
+ #ifdef USE_SYSMENU_FONT
+     gui_w32_get_menu_font(&lfSysmenu);
+     font = CreateFontIndirect(&lfSysmenu);
+ #else
       font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  		       VARIABLE_PITCH , DLG_FONT_NAME);
+ #endif
       if (s_usenewlook)
  	 oldFont = SelectFont(hdc, font);
       else
***************
*** 5340,5347 ****
--- 5384,5398 ----
       if (s_usenewlook)
       {
  	 /* do the font, since DS_3DLOOK doesn't work properly */
+ #ifdef USE_SYSMENU_FONT
+  /* point size */
+  *p++ = -MulDiv(lfSysmenu.lfHeight, 72,
+ 	 GetDeviceCaps(hdc, LOGPIXELSY));
+  nchar = nCopyAnsiToWideChar(p, TEXT(lfSysmenu.lfFaceName));
+ #else
  	 *p++ = DLG_FONT_POINT_SIZE;  //point size
  	 nchar = nCopyAnsiToWideChar (p, TEXT(DLG_FONT_NAME));
+ #endif
  	 p += nchar;
       }

***************
*** 5472,5477 ****
--- 5523,5531 ----
       HFONT     hfontTools = 0;
       DWORD     dlgFontSize;
       SIZE     size;
+ #ifdef USE_SYSMENU_FONT
+     LOGFONT lfSysmenu;
+ #endif

       s_usenewlook = FALSE;

***************
*** 5481,5488 ****
        */
       if (!is_winnt_3())
       {
  	 hfontTools = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
! 			 0, 0, 0, 0, VARIABLE_PITCH , DLG_FONT_NAME);

  	 if (hfontTools)
  	 {
--- 5535,5547 ----
        */
       if (!is_winnt_3())
       {
+ #ifdef USE_SYSMENU_FONT
+  gui_w32_get_menu_font(&lfSysmenu);
+  hfontTools = CreateFontIndirect(&lfSysmenu);
+ #else
  	 hfontTools = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
! 	 0, 0, 0, 0, VARIABLE_PITCH , DLG_FONT_NAME);
! #endif

  	 if (hfontTools)
  	 {

#162 From: Yasuhiro Matsumoto <matsu@...>
Date: Tue Jan 25, 2000 1:02 am
Subject: Re: Tearoff Menu use font given from System.
matsu@...
Send Email Send Email
 
Hi Taro , Bram , All -

Taro Muraoka wrote:
> First. Is this a problem of only multibyte users?

I thought so.
But already Vim is not a program for only singlebyte users.
You should know the mean of existing "vim-multibyte".

> It seems be a more global problem that tear-off menu is not
> affected by system property.
> But I don't know user (not only multibyte) would want to change
> font of tear-off menu.

So I leaved original source.( used USE_SYSMENU_FONT )
I don't mind that Bram change the define to comment.

> Second. Why is this function declared 'global'. It is OK to declare 'static'
> isn't it?. If there is no need to declare global, nor be necessary to
> change src/proto/gui_w32.pro.

I misstaked.

> Third. Why is 'nm' static. It seems better to take one argument pointer of
> LOGFONT and to copy value of LOGFONT to that pointer.

I would declare 'sysmenu_font' to 'global'.
and call only once.

Thanks your advice. :-)

#163 From: Bram Moolenaar <Bram@...>
Date: Wed Jan 26, 2000 7:08 pm
Subject: Vim nominated for Beanie award
Bram@...
Send Email Send Email
 
Hello Vimmers!

Vim has been nominated in the "First-Annual Slashdot Open Source Community
Awards", also known as the "Slashdot Beanie Awards".  There is a total of
$100.000 prize cash, this is something!

See the announcement at:

	 http://biz.yahoo.com/bw/000121/ma_andover_1.html

You can place your vote at:

	 http://slashdot.org/vote.pl

You need to create an account for this, but that's easy and free.
Vim is in the category "Best Open Source Text Editor".
Voting closes January 31.

This is the first time Vim has been nominated for an award that actually has a
cash prize.  In the event that Vim wins, I will pass on the money to ICCF
Holland, to help the orhpans in Uganda.  More info: http://www.vim.org/iccf
(This is just to avoid having to organize a "Vimmy award" to split the prize
up and divide it over the many people that have helped make Vim a winner!)

The award ceremony (well, since they announced there will be plenty of food
and beer, it's more a party really) is on Thursday February 3 in New York city.

--
BLACK KNIGHT:  I move for no man.
ARTHUR:        So be it!
     [hah] [parry thrust]
     [ARTHUR chops the BLACK KNIGHT's left arm off]
ARTHUR:        Now stand aside, worthy adversary.
BLACK KNIGHT:  'Tis but a scratch.
                                   The Quest for the Holy Grail (Monty Python)

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\ \   Vim: http://www.vim.org      ICCF Holland: http://www.vim.org/iccf   / /

#164 From: Bram Moolenaar <bram@...>
Date: Fri Feb 4, 2000 4:56 pm
Subject: Vim gets Beanie Award!
bram@...
Send Email Send Email
 
Thursday night, February 3, in a crowded party,
the slashdot Beanie Awards have been presented.
And guess what?  Vim won!

The category "Best Open Source Text Editor" listed
Emacs, Xemacs, Pico, Joe and Vim.  It's great that
Vim has been voted to be the winner.
Thanks to all who voted!

The $2000 price will be donated to ICCF Holland,
to help the orphans in Uganda.
See http//www.vim.org/iccf for info on the project.

More info on the Beanie Awards at http//www.slasdot.org.

--
/-/-- Bram Moolenaar --- bram@... --- http//www.moolenaar.net --\-\
\ \   Vim: http//www.vim.org       ICCF Holland: http//www.vim.org/iccf   / /

#165 From: Yasuhiro Matsumoto <matsu@...>
Date: Mon Feb 7, 2000 10:44 am
Subject: Fix of Multibyte Message
matsu@...
Send Email Send Email
 
Hi . Bram , vim-multibyte

At operating file name in message line ...
If it have multibyte character, then shown strange file name.

I made patch for multibyte message.


To Bram...
   I can't write english well,
   Please change my wrong words. ;-)

----------------------------------------------------------------------------
Problem:  Multibyte message don't show really.
Solution: Skipping multibyte in function 'vim_strsave_escaped'.
           Divergging part of multibyte and singlebyte in function
'msg_puts_attr'.
           Skipping multibyte in functino 'screen_puts'.
Files:    src/misc2.c, src/message.c, src/screen.c

*** src.orig/misc2.c Mon Jan 17 01:42:06 2000
--- src/misc2.c Mon Feb 07 19:16:12 2000
***************
*** 673,678 ****
--- 673,686 ----
       length = 1; 		 /* count the trailing '/' and NUL */
       for (p = string; *p; p++)
       {
+ #ifdef MULTI_BYTE
+  if(is_dbcs && IsLeadByte(*p) && *(p+1))
+  {
+ 	    length += 2;
+ 	    ++p; 	 /* skip multibyte */
+ 	    continue;
+  }
+ #endif /* MULTI_BYTE */
  	 if (vim_strchr(esc_chars, *p) != NULL)
  	     ++length; 	 /* count a backslash */
  	 ++length; 	 /* count an ordinary char */
***************
*** 683,688 ****
--- 691,704 ----
  	 p2 = escaped_string;
  	 for (p = string; *p; p++)
  	 {
+ #ifdef MULTI_BYTE
+ 	    if(is_dbcs && IsLeadByte(*p) && *(p+1))
+ 	    {
+ 	 *p2++ = *p++;  /* skip multibyte lead  */
+ 	 *p2++ = *p;  /* skip multibyte trail */
+ 	 continue;
+ 	    }
+ #endif /* MULTI_BYTE */
  	     if (vim_strchr(esc_chars, *p) != NULL)
  		 *p2++ = '\\';
  	     *p2++ = *p;
*** src.orig/message.c Mon Jan 17 01:42:04 2000
--- src/message.c Mon Feb 07 19:17:52 2000
***************
*** 24,29 ****
--- 24,32 ----
   static void msg_home_replace_attr __ARGS((char_u *fname, int attr));
   static int  msg_use_printf __ARGS((void));
   static void msg_screen_putchar __ARGS((int c, int attr));
+ #ifdef MULTI_BYTE
+ static void msg_screen_putcharw __ARGS((char_u *s, int attr));
+ #endif /* MULTI_BYTE */
   static int  msg_check_screen __ARGS((void));
   static void redir_write __ARGS((char_u *s));
   #ifdef CON_DIALOG
***************
*** 857,862 ****
--- 860,880 ----

       while (--len >= 0)
       {
+ #ifdef MULTI_BYTE
+  if(is_dbcs && IsLeadByte(*str) && *(str+1))
+  {
+ 	    /* check multibyte */
+ 	    char_u buf[3];
+ 	    buf[0] = *str++;
+ 	    buf[1] = *str;
+ 	    buf[2] = NUL;
+ 	    msg_puts_attr(buf, attr);
+ 	    len--;
+ 	    retval += 2;
+ 	    ++str;
+ 	    continue;
+  }
+ #endif /* MULTI_BYTE */
  	 msg_puts_attr(transchar(*str), attr);
  	 retval += charsize(*str);
  	 ++str;
***************
*** 1373,1378 ****
--- 1391,1403 ----
  		 msg_screen_putchar(' ', attr);
  	     while (msg_col & 7);
  	 }
+ #ifdef MULTI_BYTE
+  else if(is_dbcs && IsLeadByte(*s) && *(s+1))
+  {
+ 	    msg_screen_putcharw(s, attr);
+ 	    ++s;
+  }
+ #endif /* MULTI_BYTE */
  	 else
  	     msg_screen_putchar(*s, attr);
  	 ++s;
***************
*** 1412,1417 ****
--- 1437,1463 ----
  	 ++msg_row;
       }
   }
+
+ #ifdef MULTI_BYTE
+     static void
+ msg_screen_putcharw(s, attr)
+     char_u  *s;
+     int     attr;
+ {
+     char_u mbuff[3];
+     mbuff[0] = *s;
+     mbuff[1] = *(s+1);
+     mbuff[2] = NUL;
+     msg_didout = TRUE;     /* remember that line is not empty */
+     screen_puts(s, msg_row, msg_col, attr);
+     msg_col += strlen(mbuff);
+     if (msg_col >= Columns)
+     {
+  msg_col = 0;
+  ++msg_row;
+     }
+ }
+ #endif /* MULTI_BYTE */

       void
   msg_moremsg(full)
*** src.orig/screen.c Mon Feb 07 19:31:29 2000
--- src/screen.c Mon Feb 07 19:18:46 2000
***************
*** 3162,3167 ****
--- 3162,3191 ----
  	 screenp = LinePointers[row] + col;
  	 while (*text && col < Columns)
  	 {
+ #ifdef MULTI_BYTE
+ 	    char_u is_mbyte = FALSE;
+ 	    if (is_dbcs && IsLeadByte(*text) && *(text+1))
+ 	    {
+ 	 /* check if multibyte need refresh */
+ 	 if (*screenp != *text || *(screenp+1) != *(text+1)) is_mbyte = TRUE;
+ 	    }
+ 	    if (*screenp != *text || *(screenp + Columns) != attr ||
+ 							 exmode_active || is_mbyte)
+ 	    {
+ 	 *screenp = *text;
+ 	 *(screenp + Columns) = attr;
+ 	 screen_char(screenp, row, col);
+ 	 if (is_mbyte) /* refresh multibyte */
+ 	 {
+ 		    ++screenp;
+ 		    ++col;
+ 		    ++text;
+ 		    *screenp = *text;
+ 		    *(screenp + Columns) = attr;
+ 		    screen_char(screenp, row, col);
+ 	 }
+ 	    }
+ #else
  	     if (*screenp != *text || *(screenp + Columns) != attr ||
  								 exmode_active)
  	     {
***************
*** 3169,3174 ****
--- 3193,3199 ----
  		 *(screenp + Columns) = attr;
  		 screen_char(screenp, row, col);
  	     }
+ #endif /* MULTI_BYTE */
  	     ++screenp;
  	     ++col;
  	     ++text;

#166 From: Yasuhiro Matsumoto <matsu@...>
Date: Wed Feb 9, 2000 3:13 am
Subject: Fix of Multibyte Message(and word wrap)
matsu@...
Send Email Send Email
 
Yesterday, I send patch for multibyte message.
I improve it.
This is fix of wrapping multibyte message.

If cursor column is value 'Column-1',
then multibyte character can't show.
So I change function 'set_cmdspos_cursor'.

I made this patch from source 'Version 5.6.11'.

---------------------------------------------------------------

Problem:  Multibyte message don't show really.
Solution: Skipping multibyte in function 'vim_strsave_escaped'.
           Divergging part of multibyte and singlebyte in function
'msg_puts_attr'.
           Skipping multibyte in function 'screen_puts'.
           Change cursor position to just location.
Files:   src/gui.c, src/gui_w32.c, src/proto/gui_w32.pro, ex_getln.c


*** src.orig/ex_getln.c Mon Jan 17 01:42:02 2000
--- src/ex_getln.c Wed Feb 09 12:08:59 2000
***************
*** 1345,1350 ****
--- 1345,1355 ----
  	 else
   #endif
  	     c = charsize(ccline.cmdbuff[i]);
+ #ifdef MULTI_BYTE
+  /* multibyte wrap */
+  if (is_dbcs && IsLeadByte(ccline.cmdbuff[i]) &&
+ 	 (((i % Columns) + c + 1) >= Columns)) c++;
+ #endif /* MULTI_BYTE */
  	 /* If the cmdline doesn't fit, put cursor on last visible char. */
  	 if ((ccline.cmdspos += c) >= m)
  	 {
*** src.orig/message.c Mon Jan 17 01:42:04 2000
--- src/message.c Wed Feb 09 11:46:48 2000
***************
*** 24,29 ****
--- 24,32 ----
   static void msg_home_replace_attr __ARGS((char_u *fname, int attr));
   static int  msg_use_printf __ARGS((void));
   static void msg_screen_putchar __ARGS((int c, int attr));
+ #ifdef MULTI_BYTE
+ static void msg_screen_putcharw __ARGS((char_u *s, int attr));
+ #endif /* MULTI_BYTE */
   static int  msg_check_screen __ARGS((void));
   static void redir_write __ARGS((char_u *s));
   #ifdef CON_DIALOG
***************
*** 857,862 ****
--- 860,880 ----

       while (--len >= 0)
       {
+ #ifdef MULTI_BYTE
+  if(is_dbcs && IsLeadByte(*str) && *(str+1))
+  {
+ 	    /* check multibyte */
+ 	    char_u buf[3];
+ 	    buf[0] = *str++;
+ 	    buf[1] = *str;
+ 	    buf[2] = NUL;
+ 	    msg_puts_attr(buf, attr);
+ 	    len--;
+ 	    retval += 2;
+ 	    ++str;
+ 	    continue;
+  }
+ #endif /* MULTI_BYTE */
  	 msg_puts_attr(transchar(*str), attr);
  	 retval += charsize(*str);
  	 ++str;
***************
*** 1373,1378 ****
--- 1391,1403 ----
  		 msg_screen_putchar(' ', attr);
  	     while (msg_col & 7);
  	 }
+ #ifdef MULTI_BYTE
+  else if(is_dbcs && IsLeadByte(*s) && *(s+1))
+  {
+ 	    msg_screen_putcharw(s, attr);
+ 	    ++s;
+  }
+ #endif /* MULTI_BYTE */
  	 else
  	     msg_screen_putchar(*s, attr);
  	 ++s;
***************
*** 1412,1417 ****
--- 1437,1474 ----
  	 ++msg_row;
       }
   }
+
+ #ifdef MULTI_BYTE
+     static void
+ msg_screen_putcharw(s, attr)
+     char_u  *s;
+     int     attr;
+ {
+     char_u mbuff[3];
+     int mlen;
+     mbuff[0] = *s;
+     mbuff[1] = *(s+1);
+     mbuff[2] = NUL;
+     msg_didout = TRUE;     /* remember that line is not empty */
+     mlen = strlen(mbuff);
+     if (msg_col + mlen >= Columns)
+     {
+  screen_puts(" ", msg_row, msg_col, attr);
+  msg_col = 0;
+  ++msg_row;
+  screen_puts(s, msg_row, msg_col, attr);
+  msg_col = mlen;
+  return;
+     }
+     screen_puts(s, msg_row, msg_col, attr);
+     msg_col += mlen;
+     if (msg_col >= Columns)
+     {
+  msg_col = 0;
+  ++msg_row;
+     }
+ }
+ #endif /* MULTI_BYTE */

       void
   msg_moremsg(full)
*** src.orig/misc2.c Mon Jan 17 01:42:06 2000
--- src/misc2.c Wed Feb 09 11:46:35 2000
***************
*** 673,678 ****
--- 673,686 ----
       length = 1; 		 /* count the trailing '/' and NUL */
       for (p = string; *p; p++)
       {
+ #ifdef MULTI_BYTE
+  if(is_dbcs && IsLeadByte(*p) && *(p+1))
+  {
+ 	    length += 2;
+ 	    ++p; 	 /* skip multibyte */
+ 	    continue;
+  }
+ #endif /* MULTI_BYTE */
  	 if (vim_strchr(esc_chars, *p) != NULL)
  	     ++length; 	 /* count a backslash */
  	 ++length; 	 /* count an ordinary char */
***************
*** 683,688 ****
--- 691,704 ----
  	 p2 = escaped_string;
  	 for (p = string; *p; p++)
  	 {
+ #ifdef MULTI_BYTE
+ 	    if(is_dbcs && IsLeadByte(*p) && *(p+1))
+ 	    {
+ 	 *p2++ = *p++;  /* skip multibyte lead  */
+ 	 *p2++ = *p;  /* skip multibyte trail */
+ 	 continue;
+ 	    }
+ #endif /* MULTI_BYTE */
  	     if (vim_strchr(esc_chars, *p) != NULL)
  		 *p2++ = '\\';
  	     *p2++ = *p;
*** src.orig/screen.c Wed Feb 09 11:35:19 2000
--- src/screen.c Wed Feb 09 12:09:22 2000
***************
*** 3160,3167 ****
       if (NextScreen != NULL && row < Rows)     /* safety check */
       {
  	 screenp = LinePointers[row] + col;
!  while (*text && col < Columns)
  	 {
  	     if (*screenp != *text || *(screenp + Columns) != attr ||
  								 exmode_active)
  	     {
--- 3160,3191 ----
       if (NextScreen != NULL && row < Rows)     /* safety check */
       {
  	 screenp = LinePointers[row] + col;
!  while (*text && col <= Columns)
  	 {
+ #ifdef MULTI_BYTE
+ 	    char_u is_mbyte = FALSE;
+ 	    if (is_dbcs && IsLeadByte(*text) && *(text+1))
+ 	    {
+ 	 /* check if multibyte need refresh */
+ 	 if (*screenp != *text || *(screenp+1) != *(text+1)) is_mbyte = TRUE;
+ 	    }
+ 	    if (*screenp != *text || *(screenp + Columns) != attr ||
+ 							 exmode_active || is_mbyte)
+ 	    {
+ 	 *screenp = *text;
+ 	 *(screenp + Columns) = attr;
+ 	 screen_char(screenp, row, col);
+ 	 if (is_mbyte) /* refresh multibyte */
+ 	 {
+ 		    ++screenp;
+ 		    ++col;
+ 		    ++text;
+ 		    *screenp = *text;
+ 		    *(screenp + Columns) = attr;
+ 		    screen_char(screenp, row, col);
+ 	 }
+ 	    }
+ #else  /* MULTI_BYTE */
  	     if (*screenp != *text || *(screenp + Columns) != attr ||
  								 exmode_active)
  	     {
***************
*** 3169,3174 ****
--- 3193,3199 ----
  		 *(screenp + Columns) = attr;
  		 screen_char(screenp, row, col);
  	     }
+ #endif /* MULTI_BYTE */
  	     ++screenp;
  	     ++col;
  	     ++text;

#167 From: Bram Moolenaar <Bram@...>
Date: Fri Feb 11, 2000 12:25 pm
Subject: Vim 5.6 for VMS available; ftp site will move
Bram@...
Send Email Send Email
 
The binary for Vim version 5.6 is now also available for VMS.  It was compiled
and packed by Zoltan Arpadffy.

Directory: ftp://ftp.vim.org/pub/vim/vms

SIZE     FILE                   CONTENTS
2367412  vim-56-alpha.zip       Vim 5.6 exe+docs for Alpha
1859440  vim-56-vax.zip         Vim 5.6 exe+docs for VAX

For more information on the VMS version, go to:

		 http://www.polarfox.com/vim/


Another note: ftp.vim.org is going to be moved to another (faster) machine.
The internet connection will be upgraded too (about 50 times faster, can't be
bad!).  If you notice problems the coming weeks, try again a bit later.  If
the problem persists, let me know.

--
BLACK KNIGHT: I'm invincible!
ARTHUR:       You're a looney.
                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\ \   Vim: http://www.vim.org      ICCF Holland: http://www.vim.org/iccf   / /

#168 From: Bram Moolenaar <Bram@...>
Date: Mon Feb 14, 2000 10:06 pm
Subject: Multi-byte patch available
Bram@...
Send Email Send Email
 
Marcin Dalecki has made a patch to add a few things to Vim 5.6, mostly
multi-byte related.  A few of the items:
- Updated documentation
- Use gettext() for i18n (Polish and German currently supported)
- Cleanup of font handling
- Cleanup of locale handling

You can download it from here:

	 ftp://ftp.vim.org/pub/vim/unreleased/patches/vim-5.6-dalecki-4.gz

If you have comments, you can send them to the list.  Also send a copy to
Marcin, he is not subscribed to vim-multibyte:
	 Marcin Dalecki <dalecki@...>

--
You can test a person's importance in the organization by asking how much RAM
his computer has.  Anybody who knows the answer to that question is not a
decision-maker.
				 (Scott Adams - The Dilbert principle)

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\ \   Vim: http://www.vim.org      ICCF Holland: http://www.vim.org/iccf   / /

#169 From: Yasuhiro Matsumoto <matsu@...>
Date: Tue Feb 15, 2000 10:05 am
Subject: Screen is scrolled up by FEP.
matsu@...
Send Email Send Email
 
When cursor reach FEP(Front End Processor) line on consle mode,
if starting FEP then screen is scrolled up.
(For example, When you edit command...)

I could not solve this problem, so I made patch for keeping FEP line.
This solution made screen-size decrease.

I made this from source '5.6.12'

Sorry, I can't write english well, so I cound not change documents.

-------------------------------
Problem:  When cursor reach FEP(Front End Processor) line on consle mode,
            if starting FEP then screen is scrolled up.
Solution: Keep FEP line.
Files:    feature.h, os_win32.c


*** src.orig/feature.h Tue Feb 15 14:21:28 2000
--- src/feature.h Tue Feb 15 18:47:19 2000
***************
*** 432,437 ****
--- 432,444 ----
   #endif

   /*
+  * USE_CONSOLE_IME Keep FEP line. For console mode
+  */
+ #if !defined(USE_GUI_WIN32) && defined(WIN32) && defined(MULTI_BYTE)
+ #define USE_CONSOLE_IME
+ #endif
+
+ /*
    * +xim 	 X Input Method.  For entering special languages like
    * 	 chinese and Japanese.
    * +hangul_input Internal Hangul input method.  Must be included
*** src.orig/os_win32.c Tue Feb 15 14:21:29 2000
--- src/os_win32.c Tue Feb 15 18:28:42 2000
***************
*** 1233,1239 ****
--- 1233,1243 ----
       _fmode = O_BINARY;  /* we do our own CR-LF translation */

       /* Specify window size.  Is there a place to get the default from? */
+ #ifdef USE_CONSOLE_IME
+     Rows = 24;
+ #else
       Rows = 25;
+ #endif
       Columns = 80;

       /* Look for 'vimrun' */
***************
*** 1976,1994 ****
--- 1980,2010 ----

       if (GetConsoleScreenBufferInfo(g_hCurOut, &csbi))
       {
+ #ifdef USE_CONSOLE_IME
+  Rows = csbi.srWindow.Bottom - csbi.srWindow.Top;
+ #else
  	 Rows = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
+ #endif
  	 Columns = csbi.srWindow.Right - csbi.srWindow.Left + 1;
       }
       else
       {
+ #ifdef USE_CONSOLE_IME
+  Rows = 24;
+ #else
  	 Rows = 25;
+ #endif
  	 Columns = 80;
       }

       if (Columns < MIN_COLUMNS || Rows < MIN_LINES)
       {
  	 /* these values are overwritten by termcap size or default */
+ #ifdef USE_CONSOLE_IME
+  Rows = 24;
+ #else
  	 Rows = 25;
+ #endif
  	 Columns = 80;
       }

***************
*** 2100,2105 ****
--- 2116,2122 ----
   /*
    * Set the console window to `Rows' * `Columns'
    */
+ #include <windows.h>
       void
   mch_set_winsize()
   {
***************
*** 2116,2126 ****
--- 2133,2151 ----

       /* Clamp Rows and Columns to reasonable values */
       if (Rows > coordScreen.Y)
+ #ifdef USE_CONSOLE_IME
+  Rows = coordScreen.Y - 1;
+ #else
  	 Rows = coordScreen.Y;
+ #endif
       if (Columns > coordScreen.X)
  	 Columns = coordScreen.X;

+ #ifdef USE_CONSOLE_IME
+     ResizeConBufAndWindow(g_hCurOut, Columns, Rows+1);
+ #else
       ResizeConBufAndWindow(g_hCurOut, Columns, Rows);
+ #endif
       set_scroll_region(0, 0, Columns - 1, Rows - 1);
   }

***************
*** 2885,2891 ****
--- 2910,2920 ----
       g_hCurOut = g_hConOut;
       SetConsoleActiveScreenBuffer(g_hCurOut);

+ #ifdef USE_CONSOLE_IME
+     ResizeConBufAndWindow(g_hCurOut, Columns, Rows+1);
+ #else
       ResizeConBufAndWindow(g_hCurOut, Columns, Rows);
+ #endif
       set_scroll_region(0, 0, Columns - 1, Rows - 1);
       check_winsize();

***************
*** 2992,2998 ****
--- 3021,3031 ----
   clear_screen(void)
   {
       g_coord.X = g_coord.Y = 0;
+ #ifdef USE_CONSOLE_IME
+     clear_chars(g_coord, (Rows+1) * Columns);
+ #else
       clear_chars(g_coord, Rows * Columns);
+ #endif
   }

#170 From: Bram Moolenaar <Bram@...>
Date: Tue Feb 15, 2000 7:13 pm
Subject: Re: Screen is scrolled up by FEP.
Bram@...
Send Email Send Email
 
Yasuhiro Matsumoto wrote:

> When cursor reach FEP(Front End Processor) line on consle mode,
> if starting FEP then screen is scrolled up.
> (For example, When you edit command...)
>
> I could not solve this problem, so I made patch for keeping FEP line.
> This solution made screen-size decrease.

It looks like this patch reserves one line for FEP.  That's not very nice,
there is less room for the buffer text.  And doesn't this cause problems when
scrolling text up?

I recall this was changed before.  Perhaps we should write down the arguments
and descisions before changing it again.  That avoids that changes are made
while forgetting some implication.

--
I think that you'll agree that engineers are very effective in their social
interactions.  It's the "normal" people who are nuts.
				 (Scott Adams - The Dilbert principle)

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\ \   Vim: http://www.vim.org      ICCF Holland: http://www.vim.org/iccf   / /

#171 From: Yasuhiro Matsumoto <matsu@...>
Date: Wed Feb 16, 2000 1:19 am
Subject: Re: Screen is scrolled up by FEP.
matsu@...
Send Email Send Email
 
Bram Moolenaar wrote:
> It looks like this patch reserves one line for FEP.  That's not very nice,
> there is less room for the buffer text.  And doesn't this cause problems when
> scrolling text up?

I explain why I made this.
When I edit command, ...

|~                         |
|~                         |
|~                         |
|~                         |
|:r C:\Winnt\..............|
|...Sample\_               |
----------------------------

If starting FEP, then ...

|~                         |
|~                         |
|~                         |
|~                         |
|:r C:\Winnt\..............|
|...Sample\_               |
|                     [FEP]|
----------------------------

it scroll text up.
Still more, if typing some, then ...

|~                         |
|~                         |
|~                         |
|:r C:\Winnt\..............|
|...Sample\                |
|          Samp.txt_  [FEP]|
----------------------------

it make text shift.

This cause is that cursor can move to bottom line.
If I use on full screen, then I must use on 80x25.
So It is better that there is less room for the buffer text.
--------------------------------------------------------

But it is not necessarily that all FEP use bottom line.
Certainly this is not perfect solution. X-(

Then, How about the renaming that declare 'USE_CONSOLE_IME'.
For example, changing one's name to 'USE_BOTTOM_LINE_FEP'
I do not mind that this will be extension declare.

> I recall this was changed before.  Perhaps we should write down the arguments
> and descisions before changing it again.  That avoids that changes are made
> while forgetting some implication.

I think this small patch will be the solution for many FEP user.
----------------------------------------------------------
BTW,
I am introducing 'Vim' to my coworkers.
Some ones said 'It is bravo!!'.  :-)

#172 From: Bram Moolenaar <Bram@...>
Date: Wed Feb 16, 2000 11:03 am
Subject: Re: Screen is scrolled up by FEP.
Bram@...
Send Email Send Email
 
Yasuhiro Matsumoto wrote:

> it scroll text up.
> Still more, if typing some, then ...
>
> |~                         |
> |~                         |
> |~                         |
> |:r C:\Winnt\..............|
> |...Sample\                |
> |          Samp.txt_  [FEP]|
> ----------------------------
>
> it make text shift.

I wonder when you leave FEP.  Does it stay there as long as you edit the
command line, or is it just used to enter a few characters?  In the last case,
it should be possible to redraw the command line when leaving FEP.  You can
use redrawcmd() for this.  cmdline_row may need to be adjusted to compensate
for the scrolling.

If FEP stays there while editing the command line, you really need that extra
line.

> But it is not necessarily that all FEP use bottom line.
> Certainly this is not perfect solution. X-(

We can try to get close to perfect, perhaps.

> Then, How about the renaming that declare 'USE_CONSOLE_IME'.
> For example, changing one's name to 'USE_BOTTOM_LINE_FEP'
> I do not mind that this will be extension declare.

That would be possible, but it's better when it works for everybody without
the need to dig around in the code and docs to find out about this #define.

> > I recall this was changed before.  Perhaps we should write down the
> > arguments and descisions before changing it again.  That avoids that
> > changes are made while forgetting some implication.
>
> I think this small patch will be the solution for many FEP user.

I was thinking of a list of decisions with arguments, especially for the
multi-byte code.  That's because I don't understand much of this myself, which
has the risk that I break something when making changes.

--
hundred-and-one symptoms of being an internet addict:
6. You refuse to go to a vacation spot with no electricity and no phone lines.

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\ \   Vim: http://www.vim.org      ICCF Holland: http://www.vim.org/iccf   / /

#173 From: Yasuhiro Matsumoto <matsu@...>
Date: Thu Feb 17, 2000 1:43 am
Subject: Re: Screen is scrolled up by FEP.
matsu@...
Send Email Send Email
 
Bram Moolenaar wrote:
> I wonder when you leave FEP.
> Does it stay there as long as you edit the command line,
> or is it just used to enter a few characters?
> In the last case, it should be possible to redraw the command line when
leaving FEP.
> You can use redrawcmd() for this.
> cmdline_row may need to be adjusted to compensate for the scrolling.

After leaving FEP, scrolled text stay there until calling redrawcmd().
##########################################

Before starting FEP
|~                         |
|~                         |
|~                         |
|~                         |
|~                         |
|:r C:\Winnt\..............|
|...............\$$$$$$$$_ |
----------------------------
       ( '$' is multi-byte )

When starting FEP
|~                         |
|~                         |
|~                         |
|~                         |
|:r C:\Winnt\..............|
|...............\$$        |
|                  $$$[FEP]|
----------------------------
       ( '[FEP]' is guide )

When leaving FEP
|~                         |
|~                         |
|~                         |
|~                         |
|:r C:\Winnt\..............|
|...............\$$        |
|                  $$$$$$_ |
----------------------------

##########################################

It happen when starting FEP.

Still more,
it is impossible that get the event when starting( or leaving ) FEP.
and it is impossible that overwrite character to '[FEP]'.

> If FEP stays there while editing the command line, you really need that extra
> line.
> We can try to get close to perfect, perhaps.

Multi-byte user often use file's name that have multi-byte character.
So they use FEP many time while editing the command line.

I know many FEP( DOS, Windows, UNIX etc ).
and I think 'MS-DOS' is extra.

Many FEP's guide efect screen(or terminal, window) directly.
But 'MS-DOS's it efect screen-buffer( bottom line ).

It is not common library that can control all FEP.

> > Then, How about the renaming that declare 'USE_CONSOLE_IME'.
> > For example, changing one's name to 'USE_BOTTOM_LINE_FEP'
> > I do not mind that this will be extension declare.
>
> That would be possible, but it's better when it works for everybody without
> the need to dig around in the code and docs to find out about this #define.

How about this ?

nmake -f Makefile.w32 FEP=yes
         --> Console version with FEP

> > I think this small patch will be the solution for many FEP user.
>
> I was thinking of a list of decisions with arguments, especially for the
> multi-byte code.  That's because I don't understand much of this myself, which
> has the risk that I break something when making changes.

Hmmm ..., I want to hear other's idea.

#174 From: Bram Moolenaar <Bram@...>
Date: Thu Feb 17, 2000 10:51 am
Subject: Re: Screen is scrolled up by FEP.
Bram@...
Send Email Send Email
 
Yasuhiro Matsumoto wrote:

[about FEP scrolling the screen up one line]

> it is impossible that get the event when starting( or leaving ) FEP.
> and it is impossible that overwrite character to '[FEP]'.

Hmm, if it is impossible to detect entering/leaving FEP, many programs must
have problems with FEP scrolling up the screen one line!  Perhaps there is
some other solution.

It might help if you can direct us to an explanation of how FEP works (in
English please!).

> Many FEP's guide efect screen(or terminal, window) directly.
> But 'MS-DOS's it efect screen-buffer( bottom line ).

Hmm, perhaps it's a bug in FEP?

> > That would be possible, but it's better when it works for everybody without
> > the need to dig around in the code and docs to find out about this #define.
>
> How about this ?
>
> nmake -f Makefile.w32 FEP=yes
>         --> Console version with FEP

Still has the problem that the person compiling Vim has to know about this
argument.  And people using the distributed executable won't be able to do
this.  It's only a solution for a small group of people who know what they are
doing (like you).

--
hundred-and-one symptoms of being an internet addict:
23. You can't call your mother...she doesn't have a modem.

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\ \   Vim: http://www.vim.org      ICCF Holland: http://www.vim.org/iccf   / /

#175 From: Takuhiro Nishioka <takuhiro@...>
Date: Thu Feb 17, 2000 11:15 am
Subject: re-define gq command
takuhiro@...
Send Email Send Email
 
Hi.

I want to re-define gq command for Japanese folding by vim
scripts. So, I made mappings for each {motion}.
         nmap gq}  :call JP_gq("}")<CR>
         nmap gq{  :call JP_gq("{")<CR>
         nmap gqip :call JP_gq("ip")<CR>
         nmap gqap :call JP_gq("ap")<CR>
         nmap gqgq :call JP_gq("gq")<CR>
         nmap gqq  :call JP_gq("gq")<CR>
         nmap gq'a :call JP_gq("'a")<CR>
         nmap gq`a :call JP_gq("`a")<CR>
                         ...
If {motion} is search command, like /pattern/, how can I
do this? And is there any way to do this more simple?

--
Takuhiro Nishioka mailto:takuhiro@...

#176 From: Yasuhiro Matsumoto <matsu@...>
Date: Fri Feb 18, 2000 4:37 am
Subject: Re: Screen is scrolled up by FEP.
matsu@...
Send Email Send Email
 
Bram Moolenaar wrote:
> Hmm, if it is impossible to detect entering/leaving FEP, many programs must
> have problems with FEP scrolling up the screen one line!  Perhaps there is
> some other solution.

Yes, many programs have this problems. X-(
This is a reason that many competent programs can't distribute to
multi-byte user.
( A few programs support some FEP. )

> It might help if you can direct us to an explanation of how FEP works (in
> English please!).

FEP help multi-byte user when inputing multi-byte. This is indispensable
for
multi-byte user. For example, The path name of 'Windows-Desktop' is ...

    C:\Winnt\Profiles\.....\Desktop ( May be )

But multi-byte user's it is not 'Desktop'. It have multi-byte character.
So if I want to change directory 'Desktop' on console, I must use FEP.

On my environment, FEP is entered with key 'Alt-Kanji'. ( 106keyboard )
It is left with same key. But there is a few FEP used different key.

When entering FEP, it show guide of FEP. Then most FEP use a bottom
line.
( Some FEP may not use... )
When entering FEP, If I type some keys, then it show temporary
characters.
After editing some temporary words and type 'Enter', FEP playback my
written.
While entering FEP, it use a bottom line for showing the status of FEP.

If I move cursor to bottom line and enter FEP on console, it make force
that
scrolling the screen up one line for showing guide. But FEP don't put
back
when leaving.
FEP is made by maker with unique method. So it have no limitation. and
there is
no common specifications.
Certainly there is controler for some FEP, but it is a only that working
some.

Still more, there is different between 'DOS console' and 'Win32
console'.
DOS must screen size '80x25'. So guide on DOS use line 25 always. So if
cursor is
located at line 25, the screen scroll up with entering FEP.
Against it, guide on Win32 use bottom line of console window. In short,
FEP show
guide at bottom of visible area.
So if cursor is not located at bottom line of console and is located at
bottom line
of visible area, It is not happen. FEP make visible area scroll only.
In other words, if reserving a bottom line for guide, the screen don't
scroll up
with entering FEP.

This is a reason that I reserve a bottom line.

Sorry, I cound not write english well. X-(

> > Many FEP's guide efect screen(or terminal, window) directly.
> > But 'MS-DOS's it efect screen-buffer( bottom line ).
>
> Hmm, perhaps it's a bug in FEP?

This is a unique method by FEP maker.
( This may be a method by Microsoft )

> > > That would be possible, but it's better when it works for everybody
without
> > > the need to dig around in the code and docs to find out about this
#define.
> >
> > How about this ?
> >
> > nmake -f Makefile.w32 FEP=yes
> >         --> Console version with FEP
>
> Still has the problem that the person compiling Vim has to know about this
> argument.  And people using the distributed executable won't be able to do
> this.  It's only a solution for a small group of people who know what they are
> doing (like you).

I understand.

#177 From: Yasuhiro Matsumoto <matsu@...>
Date: Tue Feb 22, 2000 6:44 am
Subject: Mistake for CSI if 0x9B is contained in the multi-byte
matsu@...
Send Email Send Email
 
Hi , Bram

This is about console version.

Vim is mistaken for CSI if 0x9B is contained in the multi-byte character.
At this time, until a time-out is done, Vim stands by.

So, I made a patch.
This was made from the source version 5.6.12.

-------------------------------------------------
Problem:  Vim have mistake for CSI if 0x9B is contained in the multi-byte
character.
Solution: Don't wait if 0x9B is contained in the multi-byte character.
Files:    getchar.c

*** src.orig/getchar.c Mon Jan 17 01:42:02 2000
--- src/getchar.c Tue Feb 22 14:50:08 2000
***************
*** 1452,1457 ****
--- 1452,1469 ----
  			 {
  			     keylen = check_termcode(max_mlen + 1, NULL, 0);

+ #ifdef MULTI_BYTE
+ 			    /*
+ 			     * When having a CSI in multi-byte characters,
+ 			     * don't wait for a typed character.
+ 			     */
+ 			    if (is_dbcs && typelen > 0)
+ 			    {
+ 			 char_u lbyte = *(typebuf + typeoff-1); /* leadbyte  */
+ 			 char_u tbyte = *(typebuf + typeoff  ); /* trailbyte */
+ 			 if (IsLeadByte(lbyte) && tbyte == CSI) keylen = 0;
+ 			    }
+ #endif
  			     /*
  			      * When getting a partial match, but the last
  			      * characters were not typed, don't wait for a

#178 From: Bram Moolenaar <Bram@...>
Date: Tue Feb 22, 2000 9:47 am
Subject: Re: Mistake for CSI if 0x9B is contained in the multi-byte
Bram@...
Send Email Send Email
 
Yasuhiro Matsumoto wrote:

> This is about console version.
>
> Vim is mistaken for CSI if 0x9B is contained in the multi-byte character.
> At this time, until a time-out is done, Vim stands by.
>
> So, I made a patch.
> This was made from the source version 5.6.12.

It looks good.  I added another check if "keylen < 0", so that a matched
termcode isn't accidentally removed (although that's unlikely to happen
anyway, just to be sure).  Below is my alternative patch.

Perhaps there should also be a check if "typeoff > 0"?  Hmm, it seems
"typelen > 0" isn't needed, it is already checked around line 1304.  That
should probably be "typeoff > 0" then.  Please check!

*** ../../vim-5.6/src/getchar.c Sun Jan 16 22:41:09 2000
--- getchar.c Tue Feb 22 10:22:03 2000
***************
*** 1452,1457 ****
--- 1452,1469 ----
  			 {
  			     keylen = check_termcode(max_mlen + 1, NULL, 0);

+ #ifdef MULTI_BYTE
+ 			    /*
+ 			     * When a CSI appears in a multi-byte character,
+ 			     * don't wait for another character.
+ 			     */
+ 			    if (keylen < 0 && is_dbcs && typeoff > 0)
+ 			    {
+ 			 if (IsLeadByte(*(typebuf + typeoff - 1))
+ 					       && *(typebuf + typeoff) == CSI)
+ 				    keylen = 0;
+ 			    }
+ #endif
  			     /*
  			      * When getting a partial match, but the last
  			      * characters were not typed, don't wait for a

--
hundred-and-one symptoms of being an internet addict:
72. Somebody at IRC just mentioned a way to obtain full motion video without
     a PC using a wireless protocol called NTSC, you wonder how you never
     heard about it

/-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
\ \   Vim: http://www.vim.org      ICCF Holland: http://www.vim.org/iccf   / /

Messages 149 - 178 of 2762   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help