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.4 / 7.4.085 < prev    next >
Encoding:
Internet Message Format  |  2013-11-13  |  3.5 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.085
  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.4.085
  11. Problem:    When inserting text in Visual block mode and moving the cursor the
  12.             wrong text gets repeated in other lines.
  13. Solution:   Use the '[ mark to find the start of the actually inserted text.
  14.             (Christian Brabandt)
  15. Files:      src/ops.c, src/testdir/test39.in, src/testdir/test39.ok
  16.  
  17.  
  18. *** ../vim-7.4.084/src/ops.c    2013-11-05 07:12:59.000000000 +0100
  19. --- src/ops.c    2013-11-11 01:23:14.000000000 +0100
  20. ***************
  21. *** 2640,2645 ****
  22. --- 2640,2670 ----
  23.       {
  24.       struct block_def    bd2;
  25.   
  26. +     /* The user may have moved the cursor before inserting something, try
  27. +      * to adjust the block for that. */
  28. +     if (oap->start.lnum == curbuf->b_op_start.lnum)
  29. +     {
  30. +         if (oap->op_type == OP_INSERT
  31. +             && oap->start.col != curbuf->b_op_start.col)
  32. +         {
  33. +         oap->start.col = curbuf->b_op_start.col;
  34. +         pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
  35. +                                 - oap->start_vcol;
  36. +         oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
  37. +         }
  38. +         else if (oap->op_type == OP_APPEND
  39. +             && oap->end.col >= curbuf->b_op_start.col)
  40. +         {
  41. +         oap->start.col = curbuf->b_op_start.col;
  42. +         /* reset pre_textlen to the value of OP_INSERT */
  43. +         pre_textlen += bd.textlen;
  44. +         pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
  45. +                                 - oap->start_vcol;
  46. +         oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
  47. +         oap->op_type = OP_INSERT;
  48. +         }
  49. +     }
  50.       /*
  51.        * Spaces and tabs in the indent may have changed to other spaces and
  52.        * tabs.  Get the starting column again and correct the length.
  53. *** ../vim-7.4.084/src/testdir/test39.in    2013-11-04 01:41:11.000000000 +0100
  54. --- src/testdir/test39.in    2013-11-11 01:20:51.000000000 +0100
  55. ***************
  56. *** 19,24 ****
  57. --- 19,28 ----
  58.   :" Test block-change
  59.   G$khhhhhkkcmno
  60.   :$-4,$w! test.out
  61. + :" Test block-insert using cursor keys for movement
  62. + /^aaaa/
  63. + :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right>  \<Esc>"
  64. + :/^aa/,/^$/w >> test.out
  65.   :" gUe must uppercase a whole word, also when ▀ changes to SS
  66.   Gothe youtu▀euu endYpk0wgUe
  67.   :" gUfx must uppercase until x, inclusive.
  68. ***************
  69. *** 40,45 ****
  70. --- 44,54 ----
  71.   :qa!
  72.   ENDTEST
  73.   
  74. + aaaaaa
  75. + bbbbbb
  76. + cccccc
  77. + dddddd
  78.   abcdefghijklm
  79.   abcdefghijklm
  80.   abcdefghijklm
  81. *** ../vim-7.4.084/src/testdir/test39.ok    2013-11-04 01:41:11.000000000 +0100
  82. --- src/testdir/test39.ok    2013-11-11 01:20:51.000000000 +0100
  83. ***************
  84. *** 3,8 ****
  85. --- 3,13 ----
  86.   axyzqqqqef mno        ghijklm
  87.   axyzqqqqefgmnoklm
  88.   abcdqqqqijklm
  89. + aaa  aaa
  90. + bbb  bbb
  91. + ccc  ccc
  92. + ddd  ddd
  93.   the YOUTUSSEUU end
  94.   - yOUSSTUSSEXu -
  95.   THE YOUTUSSEUU END
  96. *** ../vim-7.4.084/src/version.c    2013-11-11 01:05:43.000000000 +0100
  97. --- src/version.c    2013-11-11 01:18:01.000000000 +0100
  98. ***************
  99. *** 740,741 ****
  100. --- 740,743 ----
  101.   {   /* Add new patch number below this line */
  102. + /**/
  103. +     85,
  104.   /**/
  105.  
  106. -- 
  107. SOLDIER: What?  Ridden on a horse?
  108. ARTHUR:  Yes!
  109. SOLDIER: You're using coconuts!
  110.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  111.  
  112.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  113. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  114. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  115.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  116.