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.0.168 < prev    next >
Encoding:
Internet Message Format  |  2002-02-02  |  2.0 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.168
  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.0.168
  11. Problem:    ":%s/\n/#/" doesn't replace at an empty line. (Bruce DeVisser)
  12. Solution:   Don't skip matches after joining two lines.
  13. Files:      src/ex_cmds.c
  14.  
  15.  
  16. *** ../vim60.167/src/ex_cmds.c    Sun Feb  3 15:27:26 2002
  17. --- src/ex_cmds.c    Sun Feb  3 17:49:34 2002
  18. ***************
  19. *** 3937,3947 ****
  20.            * 4. If do_all is set, find next match.
  21.            * Prevent endless loop with patterns that match empty
  22.            * strings, e.g. :s/$/pat/g or :s/[a-z]* /(&)/g.
  23.            */
  24.   skip:
  25. !         nmatch = -1;
  26. !         lastone = (sub_firstline[matchcol] == NUL
  27.                    || got_int || got_quit || !(do_all || do_again));
  28.           if (lastone
  29.               || do_ask
  30.               || (nmatch = vim_regexec_multi(®match, curwin,
  31. --- 3937,3948 ----
  32.            * 4. If do_all is set, find next match.
  33.            * Prevent endless loop with patterns that match empty
  34.            * strings, e.g. :s/$/pat/g or :s/[a-z]* /(&)/g.
  35. +          * But ":s/\n/#/" is OK.
  36.            */
  37.   skip:
  38. !         lastone = ((sub_firstline[matchcol] == NUL && nmatch <= 1)
  39.                    || got_int || got_quit || !(do_all || do_again));
  40. +         nmatch = -1;
  41.           if (lastone
  42.               || do_ask
  43.               || (nmatch = vim_regexec_multi(®match, curwin,
  44. *** ../vim60.167/src/version.c    Sun Feb  3 17:33:39 2002
  45. --- src/version.c    Sun Feb  3 17:53:11 2002
  46. ***************
  47. *** 608,609 ****
  48. --- 608,611 ----
  49.   {   /* Add new patch number below this line */
  50. + /**/
  51. +     168,
  52.   /**/
  53.  
  54. -- 
  55. In Joseph Heller's novel "Catch-22", the main character tries to get out of a
  56. war by proving he is crazy.  But the mere fact he wants to get out of the war
  57. only shows he isn't crazy -- creating the original "Catch-22".
  58.  
  59.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  60. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  61.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  62.