home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / old / 5.6.083 < prev    next >
Encoding:
Internet Message Format  |  2000-06-04  |  13.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.6.083 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.6.083 (extra)
  8. Problem:    Win32: The visual beep can't be seen. (Eric Roesinger)
  9. Solution:   Flush the output before waiting with GdiFlush(). (Maurice S. Barnum)
  10.         Also: Allow specifying the delay in t_vb for the GUI.
  11. Files:        src/gui.c, src/gui_amiga.c, src/gui_gtk_x11.c, src/gui_mac.c,
  12.         src/gui_riscos.c, src/gui_w32.c, src/gui_x11.c, src/gui_beos.cc,
  13.         src/proto/gui_amiga.pro, src/proto/gui_gtk_x11.pro,
  14.         src/proto/gui_mac.pro, src/proto/gui_riscos.pro,
  15.         src/proto/gui_w32.pro, src/proto/gui_x11.pro,
  16.         src/proto/gui_beos.pro
  17.  
  18.  
  19. *** ../vim-5.6.82/src/gui.c    Wed Apr  5 16:30:51 2000
  20. --- src/gui.c    Sat Apr 15 20:14:04 2000
  21. ***************
  22. *** 1296,1302 ****
  23.               gui_stop_highlight(arg1);
  24.               break;
  25.           case 'f':    /* flash the window (visual bell) */
  26. !             gui_mch_flash();
  27.               break;
  28.           default:
  29.               p = s + 1;    /* Skip the ESC */
  30. --- 1296,1302 ----
  31.               gui_stop_highlight(arg1);
  32.               break;
  33.           case 'f':    /* flash the window (visual bell) */
  34. !             gui_mch_flash(arg1 == 0 ? 20 : arg1);
  35.               break;
  36.           default:
  37.               p = s + 1;    /* Skip the ESC */
  38. *** ../vim-5.6.82/src/gui_amiga.c    Thu Jun  1 19:54:27 2000
  39. --- src/gui_amiga.c    Sun Apr 16 11:47:11 2000
  40. ***************
  41. *** 1070,1076 ****
  42.   }
  43.   
  44.       void
  45. ! gui_mch_flash(void)
  46.   {
  47.       D("gui_mch_flash");
  48.   }
  49. --- 1070,1076 ----
  50.   }
  51.   
  52.       void
  53. ! gui_mch_flash(int msec)
  54.   {
  55.       D("gui_mch_flash");
  56.   }
  57. *** ../vim-5.6.82/src/gui_gtk_x11.c    Fri Jun  2 14:40:00 2000
  58. --- src/gui_gtk_x11.c    Fri Jun  2 14:29:18 2000
  59. ***************
  60. *** 2551,2557 ****
  61.   }
  62.   
  63.   void
  64. ! gui_mch_flash()
  65.   {
  66.       GdkGCValues values;
  67.       GdkGC *invert_gc;
  68. --- 2601,2607 ----
  69.   }
  70.   
  71.   void
  72. ! gui_mch_flash(int msec)
  73.   {
  74.       GdkGCValues values;
  75.       GdkGC *invert_gc;
  76. ***************
  77. *** 2587,2593 ****
  78.                  FILL_Y((int) Rows) + gui.border_offset);
  79.   
  80.       gdk_flush();
  81. !     ui_delay(20L, TRUE);    /* wait 1/50 of a second */
  82.       gdk_draw_rectangle(gui.drawarea->window, invert_gc,
  83.                  TRUE,
  84.                  0, 0,
  85. --- 2637,2643 ----
  86.                  FILL_Y((int) Rows) + gui.border_offset);
  87.   
  88.       gdk_flush();
  89. !     ui_delay((long)msec, TRUE);    /* wait so many msec */
  90.       gdk_draw_rectangle(gui.drawarea->window, invert_gc,
  91.                  TRUE,
  92.                  0, 0,
  93. *** ../vim-5.6.82/src/gui_mac.c    Thu Jun  1 19:54:27 2000
  94. --- src/gui_mac.c    Sun Apr 30 11:35:48 2000
  95. ***************
  96. *** 1114,1120 ****
  97.   }
  98.   
  99.       void
  100. ! gui_mch_flash()
  101.   {
  102.       /* Do a visual beep by reversing the foreground and background colors */
  103.       Rect    rc;
  104. --- 1223,1230 ----
  105.   }
  106.   
  107.       void
  108. ! gui_mch_flash(msec)
  109. !     int        msec;
  110.   {
  111.       /* Do a visual beep by reversing the foreground and background colors */
  112.       Rect    rc;
  113. ***************
  114. *** 1128,1134 ****
  115.       rc.bottom = gui.num_rows * gui.char_height;
  116.       InvertRect(&rc);
  117.   
  118. !     ui_delay(20L, TRUE);        /* wait 1/50 of a second */
  119.   
  120.       InvertRect(&rc);
  121.   }
  122. --- 1238,1244 ----
  123.       rc.bottom = gui.num_rows * gui.char_height;
  124.       InvertRect(&rc);
  125.   
  126. !     ui_delay((long)msec, TRUE);        /* wait for some msec */
  127.   
  128.       InvertRect(&rc);
  129.   }
  130. *** ../vim-5.6.82/src/gui_riscos.c    Thu Jun  1 19:54:27 2000
  131. --- src/gui_riscos.c    Sun Apr 16 11:58:05 2000
  132. ***************
  133. *** 1304,1311 ****
  134.    * Visual bell.
  135.    */
  136.       void
  137. ! gui_mch_flash(void)
  138.   {
  139.   }
  140.   
  141.   
  142. --- 1304,1312 ----
  143.    * Visual bell.
  144.    */
  145.       void
  146. ! gui_mch_flash(int msec)
  147.   {
  148. +     /* TODO */
  149.   }
  150.   
  151.   
  152. *** ../vim-5.6.82/src/gui_w32.c    Thu Jun  1 19:54:27 2000
  153. --- src/gui_w32.c    Tue Apr 18 10:36:37 2000
  154. ***************
  155. *** 3580,3586 ****
  156.   }
  157.   
  158.       void
  159. ! gui_mch_flash(void)
  160.   {
  161.       RECT    rc;
  162.   
  163. --- 3580,3586 ----
  164.   }
  165.   
  166.       void
  167. ! gui_mch_flash(int msec)
  168.   {
  169.       RECT    rc;
  170.   
  171. ***************
  172. *** 3592,3599 ****
  173.       rc.right = gui.num_cols * gui.char_width;
  174.       rc.bottom = gui.num_rows * gui.char_height;
  175.       InvertRect(s_hdc, &rc);
  176.   
  177. !     ui_delay(20L, TRUE);    /* wait 1/50 of a second */
  178.   
  179.       InvertRect(s_hdc, &rc);
  180.   }
  181. --- 3592,3600 ----
  182.       rc.right = gui.num_cols * gui.char_width;
  183.       rc.bottom = gui.num_rows * gui.char_height;
  184.       InvertRect(s_hdc, &rc);
  185. +     GdiFlush();            /* make sure it's displayed */
  186.   
  187. !     ui_delay((long)msec, TRUE);    /* wait for a few msec */
  188.   
  189.       InvertRect(s_hdc, &rc);
  190.   }
  191. ***************
  192. *** 3983,3989 ****
  193.       void
  194.   gui_mch_flush(void)
  195.   {
  196. !     /* Is anything needed here? */
  197.   }
  198.   
  199.       static void
  200. --- 3984,3990 ----
  201.       void
  202.   gui_mch_flush(void)
  203.   {
  204. !     GdiFlush();
  205.   }
  206.   
  207.       static void
  208. *** ../vim-5.6.82/src/gui_x11.c    Wed Mar 29 12:35:54 2000
  209. --- src/gui_x11.c    Sun Apr 16 12:02:10 2000
  210. ***************
  211. *** 1889,1902 ****
  212.   }
  213.   
  214.       void
  215. ! gui_mch_flash()
  216.   {
  217.       /* Do a visual beep by reversing the foreground and background colors */
  218.       XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, 0, 0,
  219.           FILL_X((int)Columns) + gui.border_offset,
  220.           FILL_Y((int)Rows) + gui.border_offset);
  221.       XSync(gui.dpy, False);
  222. !     ui_delay(20L, TRUE);    /* wait 1/50 of a second */
  223.       XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, 0, 0,
  224.           FILL_X((int)Columns) + gui.border_offset,
  225.           FILL_Y((int)Rows) + gui.border_offset);
  226. --- 1898,1912 ----
  227.   }
  228.   
  229.       void
  230. ! gui_mch_flash(msec)
  231. !     int        msec;
  232.   {
  233.       /* Do a visual beep by reversing the foreground and background colors */
  234.       XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, 0, 0,
  235.           FILL_X((int)Columns) + gui.border_offset,
  236.           FILL_Y((int)Rows) + gui.border_offset);
  237.       XSync(gui.dpy, False);
  238. !     ui_delay((long)msec, TRUE);    /* wait for a few msec */
  239.       XFillRectangle(gui.dpy, gui.wid, gui.invert_gc, 0, 0,
  240.           FILL_X((int)Columns) + gui.border_offset,
  241.           FILL_Y((int)Rows) + gui.border_offset);
  242. *** ../vim-5.6.82/src/gui_beos.cc    Sat Jan 15 13:38:14 2000
  243. --- src/gui_beos.cc    Sat Apr 15 20:24:03 2000
  244. ***************
  245. *** 2664,2670 ****
  246.   }
  247.   
  248.       void
  249. ! gui_mch_flash()
  250.   {
  251.       /* Do a visual beep by reversing the foreground and background colors */
  252.   
  253. --- 2664,2670 ----
  254.   }
  255.   
  256.       void
  257. ! gui_mch_flash(int msec)
  258.   {
  259.       /* Do a visual beep by reversing the foreground and background colors */
  260.   
  261. ***************
  262. *** 2674,2680 ****
  263.       gui.vimTextArea->SetDrawingMode(B_OP_INVERT);
  264.       gui.vimTextArea->FillRect(rect);
  265.       gui.vimTextArea->Sync();
  266. !     snooze(20 * 1000);     /* wait 1/50 of a second */
  267.       gui.vimTextArea->FillRect(rect);
  268.       gui.vimTextArea->SetDrawingMode(B_OP_COPY);
  269.       gui.vimTextArea->Flush();
  270. --- 2674,2680 ----
  271.       gui.vimTextArea->SetDrawingMode(B_OP_INVERT);
  272.       gui.vimTextArea->FillRect(rect);
  273.       gui.vimTextArea->Sync();
  274. !     snooze(msec * 1000);     /* wait for a few msec */
  275.       gui.vimTextArea->FillRect(rect);
  276.       gui.vimTextArea->SetDrawingMode(B_OP_COPY);
  277.       gui.vimTextArea->Flush();
  278. *** ../vim-5.6.82/src/proto/gui_amiga.pro    Sun Jan 16 14:23:21 2000
  279. --- src/proto/gui_amiga.pro    Sat Apr 15 20:18:24 2000
  280. ***************
  281. *** 31,37 ****
  282.   void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags));
  283.   int gui_mch_haskey __ARGS((char_u *name));
  284.   void gui_mch_beep __ARGS((void));
  285. ! void gui_mch_flash __ARGS((void));
  286.   void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
  287.   void gui_mch_iconify __ARGS((void));
  288.   void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
  289. --- 31,37 ----
  290.   void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags));
  291.   int gui_mch_haskey __ARGS((char_u *name));
  292.   void gui_mch_beep __ARGS((void));
  293. ! void gui_mch_flash __ARGS((int msec));
  294.   void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
  295.   void gui_mch_iconify __ARGS((void));
  296.   void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
  297. *** ../vim-5.6.82/src/proto/gui_gtk_x11.pro    Sun Jan 16 14:23:16 2000
  298. --- src/proto/gui_gtk_x11.pro    Sat Apr 15 20:18:47 2000
  299. ***************
  300. *** 26,32 ****
  301.   int gui_mch_haskey __ARGS((char_u *name));
  302.   int gui_get_x11_windis __ARGS((Window *win, Display **dis));
  303.   void gui_mch_beep __ARGS((void));
  304. ! void gui_mch_flash __ARGS((void));
  305.   void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
  306.   void gui_mch_iconify __ARGS((void));
  307.   void gui_mch_draw_hollow_cursor __ARGS((GuiColor color));
  308. --- 26,32 ----
  309.   int gui_mch_haskey __ARGS((char_u *name));
  310.   int gui_get_x11_windis __ARGS((Window *win, Display **dis));
  311.   void gui_mch_beep __ARGS((void));
  312. ! void gui_mch_flash __ARGS((int msec));
  313.   void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
  314.   void gui_mch_iconify __ARGS((void));
  315.   void gui_mch_draw_hollow_cursor __ARGS((GuiColor color));
  316. *** ../vim-5.6.82/src/proto/gui_mac.pro    Wed Aug 18 21:14:31 1999
  317. --- src/proto/gui_mac.pro    Sat Apr 15 20:19:57 2000
  318. ***************
  319. *** 47,53 ****
  320.   void gui_mch_draw_string __PARMS((int row, int col, char_u *s, int len, int flags));
  321.   int gui_mch_haskey __PARMS((char_u *name));
  322.   void gui_mch_beep __PARMS((void));
  323. ! void gui_mch_flash __PARMS((void));
  324.   void gui_mch_invert_rectangle __PARMS((int r, int c, int nr, int nc));
  325.   void gui_mch_iconify __PARMS((void));
  326.   void gui_mch_settitle __PARMS((char_u *title, char_u *icon));
  327. --- 47,53 ----
  328.   void gui_mch_draw_string __PARMS((int row, int col, char_u *s, int len, int flags));
  329.   int gui_mch_haskey __PARMS((char_u *name));
  330.   void gui_mch_beep __PARMS((void));
  331. ! void gui_mch_flash __PARMS((int msec));
  332.   void gui_mch_invert_rectangle __PARMS((int r, int c, int nr, int nc));
  333.   void gui_mch_iconify __PARMS((void));
  334.   void gui_mch_settitle __PARMS((char_u *title, char_u *icon));
  335. *** ../vim-5.6.82/src/proto/gui_riscos.pro    Sat Jan 16 21:04:46 1999
  336. --- src/proto/gui_riscos.pro    Sat Apr 15 20:20:59 2000
  337. ***************
  338. *** 20,26 ****
  339.   void gui_mch_draw_string (int row, int col, char_u *s, int len, int flags);
  340.   int gui_mch_haskey (char_u *name);
  341.   void gui_mch_beep (void);
  342. ! void gui_mch_flash (void);
  343.   void gui_mch_invert_rectangle (int r, int c, int nr, int nc);
  344.   void gui_mch_iconify (void);
  345.   void gui_mch_draw_hollow_cursor (GuiColor color);
  346. --- 20,26 ----
  347.   void gui_mch_draw_string (int row, int col, char_u *s, int len, int flags);
  348.   int gui_mch_haskey (char_u *name);
  349.   void gui_mch_beep (void);
  350. ! void gui_mch_flash (int msec);
  351.   void gui_mch_invert_rectangle (int r, int c, int nr, int nc);
  352.   void gui_mch_iconify (void);
  353.   void gui_mch_draw_hollow_cursor (GuiColor color);
  354. *** ../vim-5.6.82/src/proto/gui_w32.pro    Mon Jan 24 13:09:40 2000
  355. --- src/proto/gui_w32.pro    Sat Apr 15 20:22:08 2000
  356. ***************
  357. *** 34,40 ****
  358.   void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags));
  359.   int gui_mch_haskey __ARGS((char_u *name));
  360.   void gui_mch_beep __ARGS((void));
  361. ! void gui_mch_flash __ARGS((void));
  362.   void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
  363.   void gui_mch_iconify __ARGS((void));
  364.   void gui_mch_set_foreground __ARGS((void));
  365. --- 34,40 ----
  366.   void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags));
  367.   int gui_mch_haskey __ARGS((char_u *name));
  368.   void gui_mch_beep __ARGS((void));
  369. ! void gui_mch_flash __ARGS((int msec));
  370.   void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
  371.   void gui_mch_iconify __ARGS((void));
  372.   void gui_mch_set_foreground __ARGS((void));
  373. *** ../vim-5.6.82/src/proto/gui_x11.pro    Sun Jan 16 14:23:17 2000
  374. --- src/proto/gui_x11.pro    Sat Apr 15 20:23:05 2000
  375. ***************
  376. *** 23,29 ****
  377.   int gui_mch_haskey __ARGS((char_u *name));
  378.   int gui_get_x11_windis __ARGS((Window *win, Display **dis));
  379.   void gui_mch_beep __ARGS((void));
  380. ! void gui_mch_flash __ARGS((void));
  381.   void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
  382.   void gui_mch_iconify __ARGS((void));
  383.   void gui_mch_draw_hollow_cursor __ARGS((GuiColor color));
  384. --- 23,29 ----
  385.   int gui_mch_haskey __ARGS((char_u *name));
  386.   int gui_get_x11_windis __ARGS((Window *win, Display **dis));
  387.   void gui_mch_beep __ARGS((void));
  388. ! void gui_mch_flash __ARGS((int msec));
  389.   void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
  390.   void gui_mch_iconify __ARGS((void));
  391.   void gui_mch_draw_hollow_cursor __ARGS((GuiColor color));
  392. *** ../vim-5.6.82/src/proto/gui_beos.pro    Thu Jan 22 21:51:26 1998
  393. --- src/proto/gui_beos.pro    Sat Apr 15 20:24:57 2000
  394. ***************
  395. *** 9,13 ****
  396.   GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
  397.   void gui_mch_set_bg_color __ARGS((GuiColor color));
  398.   void gui_mch_set_font __ARGS((GuiFont font));
  399. ! void gui_mch_flush __ARGS((void));
  400.   char_u *gui_mch_get_rgb __ARGS((GuiColor pixel));
  401. --- 9,13 ----
  402.   GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
  403.   void gui_mch_set_bg_color __ARGS((GuiColor color));
  404.   void gui_mch_set_font __ARGS((GuiFont font));
  405. ! void gui_mch_flush __ARGS((int msec));
  406.   char_u *gui_mch_get_rgb __ARGS((GuiColor pixel));
  407. *** ../vim-5.6.82/src/version.c    Mon Jun  5 11:24:35 2000
  408. --- src/version.c    Mon Jun  5 11:28:51 2000
  409. ***************
  410. *** 420,421 ****
  411. --- 420,423 ----
  412.   {   /* Add new patch number below this line */
  413. + /**/
  414. +     83,
  415.   /**/
  416.  
  417. -- 
  418. "I've been teaching myself to play the piano for about 5 years and now write
  419. most of my songs on it, mainly because I can never find any paper."
  420.         Jeff Lynne, ELO's greatest hits
  421.  
  422. /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\
  423. \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
  424.