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 / 7.3 / 7.3.871 < prev    next >
Encoding:
Internet Message Format  |  2013-03-18  |  2.7 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.871
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.871
  11. Problem:    search('^$', 'c') does not use the empty match under the cursor.
  12. Solution:   Special handling of the 'c' flag. (Christian Brabandt)
  13.         Add tests.
  14. Files:        src/search.c, src/testdir/test14.in, src/testdir/test14.ok
  15.  
  16.  
  17. *** ../vim-7.3.870/src/search.c    2013-02-20 18:39:07.000000000 +0100
  18. --- src/search.c    2013-03-19 15:23:13.000000000 +0100
  19. ***************
  20. *** 727,732 ****
  21. --- 727,734 ----
  22.                       ++matchcol;
  23.                   }
  24.                   }
  25. +                 if (options & SEARCH_START)
  26. +                 break;
  27.                   if (ptr[matchcol] == NUL
  28.                       || (nmatched = vim_regexec_multi(®match,
  29.                             win, buf, lnum + matchpos.lnum,
  30. *** ../vim-7.3.870/src/testdir/test14.in    2010-08-15 21:57:29.000000000 +0200
  31. --- src/testdir/test14.in    2013-03-19 15:21:54.000000000 +0100
  32. ***************
  33. *** 2,7 ****
  34. --- 2,8 ----
  35.   Also test ":s/pat/sub/" with different ~s in sub.
  36.   Also test for ^Vxff and ^Vo123 in Insert mode.
  37.   Also test "[m", "]m", "[M" and "]M"
  38. + Also test search()
  39.   
  40.   STARTTEST
  41.   :so small.vim
  42. ***************
  43. *** 34,39 ****
  44. --- 35,50 ----
  45.   2[MaJ:.w >>test.out
  46.   k[MaK:.w >>test.out
  47.   3[MaL:.w >>test.out
  48. + :"
  49. + /^foobar
  50. + :let startline = line('.')
  51. + :call search('foobar', 'c')
  52. + :call append(line('$'), line('.') - startline)
  53. + j:call search('^$', 'c')
  54. + :call append(line('$'), line('.') - startline)
  55. + :call search('^$', 'bc')
  56. + :call append(line('$'), line('.') - startline)
  57. + :/^search()/,$w >>test.out
  58.   :qa!
  59.   ENDTEST
  60.   
  61. ***************
  62. *** 64,66 ****
  63. --- 75,82 ----
  64.           }
  65.       } e3
  66.   }
  67. + foobar
  68. + search()
  69. *** ../vim-7.3.870/src/testdir/test14.ok    2010-08-15 21:57:29.000000000 +0200
  70. --- src/testdir/test14.ok    2013-03-19 15:26:18.000000000 +0100
  71. ***************
  72. *** 15,17 ****
  73. --- 15,21 ----
  74.       }JH e3
  75.       }K e2
  76.   {LF
  77. + search()
  78. + 0
  79. + 1
  80. + 1
  81. *** ../vim-7.3.870/src/version.c    2013-03-19 14:48:25.000000000 +0100
  82. --- src/version.c    2013-03-19 15:26:38.000000000 +0100
  83. ***************
  84. *** 730,731 ****
  85. --- 730,733 ----
  86.   {   /* Add new patch number below this line */
  87. + /**/
  88. +     871,
  89.   /**/
  90.  
  91. -- 
  92. hundred-and-one symptoms of being an internet addict:
  93. 75. You start wondering whether you could actually upgrade your brain
  94.     with a Pentium Pro microprocessor 80.  The upgrade works just fine.
  95.  
  96.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  97. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  98. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  99.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  100.