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 / 6.1.175 < prev    next >
Encoding:
Internet Message Format  |  2002-09-13  |  2.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.175
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.175
  11. Problem:    When reading commands from a pipe and a CTRL-C is pressed, Vim
  12.         will hang. (Piet Delport)
  13. Solution:   Don't keep reading characters to clear typeahead when an interrupt
  14.         was detected, stop when a single CTRL-C is read.
  15. Files:        src/getchar.c, src/ui.c
  16.  
  17.  
  18. *** ../vim61.174/src/getchar.c    Sun Aug 18 21:27:29 2002
  19. --- src/getchar.c    Thu Sep  5 21:55:25 2002
  20. ***************
  21. *** 2577,2582 ****
  22. --- 2577,2584 ----
  23.       /*
  24.        * If we got an interrupt, skip all previously typed characters and
  25.        * return TRUE if quit reading script file.
  26. +      * Stop reading typeahead when a single CTRL-C was read,
  27. +      * fill_input_buf() returns this when not able to read from stdin.
  28.        * Don't use buf[] here, closescript() may have freed typebuf.tb_buf[]
  29.        * and buf may be pointing inside typebuf.tb_buf[].
  30.        */
  31. ***************
  32. *** 2585,2592 ****
  33.   #define DUM_LEN MAXMAPLEN * 3 + 3
  34.           char_u    dum[DUM_LEN + 1];
  35.   
  36. !         while (ui_inchar(dum, DUM_LEN, 0L) != 0)
  37. !         ;
  38.           return retesc;
  39.       }
  40.   
  41. --- 2587,2598 ----
  42.   #define DUM_LEN MAXMAPLEN * 3 + 3
  43.           char_u    dum[DUM_LEN + 1];
  44.   
  45. !         for (;;)
  46. !         {
  47. !         len = ui_inchar(dum, DUM_LEN, 0L);
  48. !         if (len == 0 || (len == 1 && dum[0] == 3))
  49. !             break;
  50. !         }
  51.           return retesc;
  52.       }
  53.   
  54. *** ../vim61.174/src/ui.c    Sun Apr 28 22:00:14 2002
  55. --- src/ui.c    Thu Sep  5 21:50:47 2002
  56. ***************
  57. *** 1708,1714 ****
  58.   # endif
  59.       if (len <= 0 && !got_int)
  60.       read_error_exit();
  61. !     did_read_something = TRUE;
  62.       if (got_int)
  63.       {
  64.       inbuf[inbufcount] = 3;
  65. --- 1708,1715 ----
  66.   # endif
  67.       if (len <= 0 && !got_int)
  68.       read_error_exit();
  69. !     if (len > 0)
  70. !     did_read_something = TRUE;
  71.       if (got_int)
  72.       {
  73.       inbuf[inbufcount] = 3;
  74. *** ../vim61.174/src/version.c    Sat Sep  7 22:20:49 2002
  75. --- src/version.c    Sat Sep 14 16:55:08 2002
  76. ***************
  77. *** 608,609 ****
  78. --- 608,611 ----
  79.   {   /* Add new patch number below this line */
  80. + /**/
  81. +     175,
  82.   /**/
  83.  
  84. -- 
  85. Why i like vim:
  86. > I like VIM because, when I ask a question in this newsgroup, I get a
  87. > one-line answer.  With xemacs, I get a 1Kb lisp script with bugs in it ;-)
  88.  
  89.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  90. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  91. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  92.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  93.