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.093 < prev    next >
Encoding:
Internet Message Format  |  2000-06-05  |  3.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.6.093 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.6.093 (extra)
  8. Problem:    Win32 GUI: "ls | gvim -" will show a message box about reading
  9.         stdin when Vim exits. (Donohue)
  10. Solution:   Don't write a message about the file read from stdin until the GUI
  11.         has started.
  12. Files:        src/fileio.c
  13.  
  14.  
  15. *** ../vim-5.6.92/src/fileio.c    Mon Jun  5 19:03:00 2000
  16. --- src/fileio.c    Tue Jun  6 19:27:58 2000
  17. ***************
  18. *** 471,488 ****
  19.        * still be running, don't move the cursor to the last line, unless
  20.        * always using the GUI.
  21.        */
  22. - #ifndef ALWAYS_USE_GUI
  23.       if (read_stdin)
  24.       {
  25.           mch_msg("Vim: Reading from stdin...\n");
  26. ! # ifdef USE_GUI
  27.           /* Also write a message in the GUI window, if there is one. */
  28.           if (gui.in_use)
  29.           gui_write((char_u *)"Reading from stdin...", 21);
  30. ! # endif
  31.       }
  32.       else
  33. - #endif
  34.           filemess(curbuf, sfname, (char_u *)"", 0);
  35.       }
  36.   
  37. --- 477,494 ----
  38.        * still be running, don't move the cursor to the last line, unless
  39.        * always using the GUI.
  40.        */
  41.       if (read_stdin)
  42.       {
  43. + #ifndef ALWAYS_USE_GUI
  44.           mch_msg("Vim: Reading from stdin...\n");
  45. ! #endif
  46. ! #ifdef USE_GUI
  47.           /* Also write a message in the GUI window, if there is one. */
  48.           if (gui.in_use)
  49.           gui_write((char_u *)"Reading from stdin...", 21);
  50. ! #endif
  51.       }
  52.       else
  53.           filemess(curbuf, sfname, (char_u *)"", 0);
  54.       }
  55.   
  56. ***************
  57. *** 951,957 ****
  58.           c = TRUE;
  59.           msg_add_lines(c, (long)linecnt, filesize);
  60.   
  61. !         keep_msg = msg_trunc_attr(IObuff, FALSE, 0);
  62.           keep_msg_attr = 0;
  63.           if (read_stdin)
  64.           {
  65. --- 957,970 ----
  66.           c = TRUE;
  67.           msg_add_lines(c, (long)linecnt, filesize);
  68.   
  69. ! #ifdef ALWAYS_USE_GUI
  70. !         /* Don't show the message when reading stdin, it would end up in a
  71. !          * message box (which might be shown when exiting!) */
  72. !         if (read_stdin)
  73. !         keep_msg = msg_may_trunc(FALSE, IObuff);
  74. !         else
  75. ! #endif
  76. !         keep_msg = msg_trunc_attr(IObuff, FALSE, 0);
  77.           keep_msg_attr = 0;
  78.           if (read_stdin)
  79.           {
  80. *** ../vim-5.6.92/src/version.c    Tue Jun  6 15:38:57 2000
  81. --- src/version.c    Tue Jun  6 19:30:02 2000
  82. ***************
  83. *** 420,421 ****
  84. --- 420,423 ----
  85.   {   /* Add new patch number below this line */
  86. + /**/
  87. +     93,
  88.   /**/
  89.  
  90. -- 
  91. Any resemblance between the above views and those of my employer, my terminal,
  92. or the view out my window are purely coincidental.  Any resemblance between
  93. the above and my own views is non-deterministic.  The question of the
  94. existence of views in the absence of anyone to hold them is left as an
  95. exercise for the reader.  The question of the existence of the reader is left
  96. as an exercise for the second god coefficient.  (A discussion of
  97. non-orthogonal, non-integral polytheism is beyond the scope of this article.)
  98.                         (Ralph Jennings)
  99.  
  100. /-/-- Bram Moolenaar --- Bram@moolenaar.net --- http://www.moolenaar.net --\-\
  101. \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
  102.