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.395 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  2.9 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.395
  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.395 (after 7.3.251)
  11. Problem:    "dv?bar" in the last line deletes too much and breaks undo.
  12. Solution:   Only adjust the cursor position when it's after the last line of
  13.         the buffer.  Add a test. (Christian Brabandt)
  14. Files:        src/ops.c, src/testdir/test43.in, src/testdir/test43.ok
  15.  
  16.  
  17. *** ../vim-7.3.394/src/ops.c    2011-09-21 17:33:49.000000000 +0200
  18. --- src/ops.c    2012-01-10 13:28:05.000000000 +0100
  19. ***************
  20. *** 1961,1968 ****
  21.           /* Special case: gH<Del> deletes the last line. */
  22.           del_lines(1L, FALSE);
  23.           curwin->w_cursor = curpos;    /* restore curwin->w_cursor */
  24. !         if (curwin->w_cursor.lnum > 1)
  25. !             --curwin->w_cursor.lnum;
  26.           }
  27.           else
  28.           {
  29. --- 1962,1969 ----
  30.           /* Special case: gH<Del> deletes the last line. */
  31.           del_lines(1L, FALSE);
  32.           curwin->w_cursor = curpos;    /* restore curwin->w_cursor */
  33. !         if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
  34. !             curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
  35.           }
  36.           else
  37.           {
  38. ***************
  39. *** 4434,4440 ****
  40.   #endif
  41.   
  42.   /*
  43. !  * implementation of the format operator 'gq'
  44.    */
  45.       void
  46.   op_format(oap, keep_cursor)
  47. --- 4435,4441 ----
  48.   #endif
  49.   
  50.   /*
  51. !  * Implementation of the format operator 'gq'.
  52.    */
  53.       void
  54.   op_format(oap, keep_cursor)
  55. *** ../vim-7.3.394/src/testdir/test43.in    2010-08-15 21:57:29.000000000 +0200
  56. --- src/testdir/test43.in    2012-01-10 13:41:13.000000000 +0100
  57. ***************
  58. *** 13,19 ****
  59.   x:set magic
  60.   /\v(a)(b)\2\1\1/e
  61.   x/\V[ab]\(\[xy]\)\1
  62. ! x:?^1?,$w! test.out
  63.   :qa!
  64.   ENDTEST
  65.   
  66. --- 13,23 ----
  67.   x:set magic
  68.   /\v(a)(b)\2\1\1/e
  69.   x/\V[ab]\(\[xy]\)\1
  70. ! x:$
  71. ! :set undolevels=100
  72. ! dv?bar?
  73. ! Yup:"
  74. ! :?^1?,$w! test.out
  75.   :qa!
  76.   ENDTEST
  77.   
  78. ***************
  79. *** 25,27 ****
  80. --- 29,33 ----
  81.   6 x ^aa$ x
  82.   7 (a)(b) abbaa
  83.   8 axx [ab]xx
  84. + 9 foobar
  85. *** ../vim-7.3.394/src/testdir/test43.ok    2010-08-15 21:57:29.000000000 +0200
  86. --- src/testdir/test43.ok    2012-01-10 13:42:39.000000000 +0100
  87. ***************
  88. *** 6,8 ****
  89. --- 6,11 ----
  90.   6 x aa$ x
  91.   7 (a)(b) abba
  92.   8 axx ab]xx
  93. + 9 foobar
  94. + 9 foo
  95. *** ../vim-7.3.394/src/version.c    2012-01-10 12:42:05.000000000 +0100
  96. --- src/version.c    2012-01-10 13:30:40.000000000 +0100
  97. ***************
  98. *** 716,717 ****
  99. --- 716,719 ----
  100.   {   /* Add new patch number below this line */
  101. + /**/
  102. +     395,
  103.   /**/
  104.  
  105. -- 
  106. The Law, in its majestic equality, forbids the rich, as well as the
  107. poor, to sleep under the bridges, to beg in the streets, and to steal
  108. bread.                       -- Anatole France
  109.  
  110.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  111. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  112. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  113.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  114.