|
Karsten Hopp |
9b98e5 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
9b98e5 |
Subject: Patch 7.4.085
|
|
Karsten Hopp |
9b98e5 |
Fcc: outbox
|
|
Karsten Hopp |
9b98e5 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
9b98e5 |
Mime-Version: 1.0
|
|
Karsten Hopp |
9b98e5 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
9b98e5 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
9b98e5 |
------------
|
|
Karsten Hopp |
9b98e5 |
|
|
Karsten Hopp |
9b98e5 |
Patch 7.4.085
|
|
Karsten Hopp |
9b98e5 |
Problem: When inserting text in Visual block mode and moving the cursor the
|
|
Karsten Hopp |
9b98e5 |
wrong text gets repeated in other lines.
|
|
Karsten Hopp |
9b98e5 |
Solution: Use the '[ mark to find the start of the actually inserted text.
|
|
Karsten Hopp |
9b98e5 |
(Christian Brabandt)
|
|
Karsten Hopp |
9b98e5 |
Files: src/ops.c, src/testdir/test39.in, src/testdir/test39.ok
|
|
Karsten Hopp |
9b98e5 |
|
|
Karsten Hopp |
9b98e5 |
|
|
Karsten Hopp |
9b98e5 |
*** ../vim-7.4.084/src/ops.c 2013-11-05 07:12:59.000000000 +0100
|
|
Karsten Hopp |
9b98e5 |
--- src/ops.c 2013-11-11 01:23:14.000000000 +0100
|
|
Karsten Hopp |
9b98e5 |
***************
|
|
Karsten Hopp |
9b98e5 |
*** 2640,2645 ****
|
|
Karsten Hopp |
9b98e5 |
--- 2640,2670 ----
|
|
Karsten Hopp |
9b98e5 |
{
|
|
Karsten Hopp |
9b98e5 |
struct block_def bd2;
|
|
Karsten Hopp |
9b98e5 |
|
|
Karsten Hopp |
9b98e5 |
+ /* The user may have moved the cursor before inserting something, try
|
|
Karsten Hopp |
9b98e5 |
+ * to adjust the block for that. */
|
|
Karsten Hopp |
9b98e5 |
+ if (oap->start.lnum == curbuf->b_op_start.lnum)
|
|
Karsten Hopp |
9b98e5 |
+ {
|
|
Karsten Hopp |
9b98e5 |
+ if (oap->op_type == OP_INSERT
|
|
Karsten Hopp |
9b98e5 |
+ && oap->start.col != curbuf->b_op_start.col)
|
|
Karsten Hopp |
9b98e5 |
+ {
|
|
Karsten Hopp |
9b98e5 |
+ oap->start.col = curbuf->b_op_start.col;
|
|
Karsten Hopp |
9b98e5 |
+ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
|
|
Karsten Hopp |
9b98e5 |
+ - oap->start_vcol;
|
|
Karsten Hopp |
9b98e5 |
+ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
|
|
Karsten Hopp |
9b98e5 |
+ }
|
|
Karsten Hopp |
9b98e5 |
+ else if (oap->op_type == OP_APPEND
|
|
Karsten Hopp |
9b98e5 |
+ && oap->end.col >= curbuf->b_op_start.col)
|
|
Karsten Hopp |
9b98e5 |
+ {
|
|
Karsten Hopp |
9b98e5 |
+ oap->start.col = curbuf->b_op_start.col;
|
|
Karsten Hopp |
9b98e5 |
+ /* reset pre_textlen to the value of OP_INSERT */
|
|
Karsten Hopp |
9b98e5 |
+ pre_textlen += bd.textlen;
|
|
Karsten Hopp |
9b98e5 |
+ pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
|
|
Karsten Hopp |
9b98e5 |
+ - oap->start_vcol;
|
|
Karsten Hopp |
9b98e5 |
+ oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
|
|
Karsten Hopp |
9b98e5 |
+ oap->op_type = OP_INSERT;
|
|
Karsten Hopp |
9b98e5 |
+ }
|
|
Karsten Hopp |
9b98e5 |
+ }
|
|
Karsten Hopp |
9b98e5 |
+
|
|
Karsten Hopp |
9b98e5 |
/*
|
|
Karsten Hopp |
9b98e5 |
* Spaces and tabs in the indent may have changed to other spaces and
|
|
Karsten Hopp |
9b98e5 |
* tabs. Get the starting column again and correct the length.
|
|
Karsten Hopp |
9b98e5 |
*** ../vim-7.4.084/src/testdir/test39.in 2013-11-04 01:41:11.000000000 +0100
|
|
Karsten Hopp |
9b98e5 |
--- src/testdir/test39.in 2013-11-11 01:20:51.000000000 +0100
|
|
Karsten Hopp |
9b98e5 |
***************
|
|
Karsten Hopp |
9b98e5 |
*** 19,24 ****
|
|
Karsten Hopp |
9b98e5 |
--- 19,28 ----
|
|
Karsten Hopp |
9b98e5 |
:" Test block-change
|
|
Karsten Hopp |
9b98e5 |
G$khhh?hhkkcmno?
|
|
Karsten Hopp |
9b98e5 |
:$-4,$w! test.out
|
|
Karsten Hopp |
9b98e5 |
+ :" Test block-insert using cursor keys for movement
|
|
Karsten Hopp |
9b98e5 |
+ /^aaaa/
|
|
Karsten Hopp |
9b98e5 |
+ :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right> \<Esc>"
|
|
Karsten Hopp |
9b98e5 |
+ :/^aa/,/^$/w >> test.out
|
|
Karsten Hopp |
9b98e5 |
:" gUe must uppercase a whole word, also when ß changes to SS
|
|
Karsten Hopp |
9b98e5 |
Gothe youtußeuu end?Ypk0wgUe
|
|
Karsten Hopp |
9b98e5 |
:" gUfx must uppercase until x, inclusive.
|
|
Karsten Hopp |
9b98e5 |
***************
|
|
Karsten Hopp |
9b98e5 |
*** 40,45 ****
|
|
Karsten Hopp |
9b98e5 |
--- 44,54 ----
|
|
Karsten Hopp |
9b98e5 |
:qa!
|
|
Karsten Hopp |
9b98e5 |
ENDTEST
|
|
Karsten Hopp |
9b98e5 |
|
|
Karsten Hopp |
9b98e5 |
+ aaaaaa
|
|
Karsten Hopp |
9b98e5 |
+ bbbbbb
|
|
Karsten Hopp |
9b98e5 |
+ cccccc
|
|
Karsten Hopp |
9b98e5 |
+ dddddd
|
|
Karsten Hopp |
9b98e5 |
+
|
|
Karsten Hopp |
9b98e5 |
abcdefghijklm
|
|
Karsten Hopp |
9b98e5 |
abcdefghijklm
|
|
Karsten Hopp |
9b98e5 |
abcdefghijklm
|
|
Karsten Hopp |
9b98e5 |
*** ../vim-7.4.084/src/testdir/test39.ok 2013-11-04 01:41:11.000000000 +0100
|
|
Karsten Hopp |
9b98e5 |
--- src/testdir/test39.ok 2013-11-11 01:20:51.000000000 +0100
|
|
Karsten Hopp |
9b98e5 |
***************
|
|
Karsten Hopp |
9b98e5 |
*** 3,8 ****
|
|
Karsten Hopp |
9b98e5 |
--- 3,13 ----
|
|
Karsten Hopp |
9b98e5 |
axyzqqqqef mno ghijklm
|
|
Karsten Hopp |
9b98e5 |
axyzqqqqefgmnoklm
|
|
Karsten Hopp |
9b98e5 |
abcdqqqqijklm
|
|
Karsten Hopp |
9b98e5 |
+ aaa aaa
|
|
Karsten Hopp |
9b98e5 |
+ bbb bbb
|
|
Karsten Hopp |
9b98e5 |
+ ccc ccc
|
|
Karsten Hopp |
9b98e5 |
+ ddd ddd
|
|
Karsten Hopp |
9b98e5 |
+
|
|
Karsten Hopp |
9b98e5 |
the YOUTUSSEUU end
|
|
Karsten Hopp |
9b98e5 |
- yOUSSTUSSEXu -
|
|
Karsten Hopp |
9b98e5 |
THE YOUTUSSEUU END
|
|
Karsten Hopp |
9b98e5 |
*** ../vim-7.4.084/src/version.c 2013-11-11 01:05:43.000000000 +0100
|
|
Karsten Hopp |
9b98e5 |
--- src/version.c 2013-11-11 01:18:01.000000000 +0100
|
|
Karsten Hopp |
9b98e5 |
***************
|
|
Karsten Hopp |
9b98e5 |
*** 740,741 ****
|
|
Karsten Hopp |
9b98e5 |
--- 740,743 ----
|
|
Karsten Hopp |
9b98e5 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
9b98e5 |
+ /**/
|
|
Karsten Hopp |
9b98e5 |
+ 85,
|
|
Karsten Hopp |
9b98e5 |
/**/
|
|
Karsten Hopp |
9b98e5 |
|
|
Karsten Hopp |
9b98e5 |
--
|
|
Karsten Hopp |
9b98e5 |
SOLDIER: What? Ridden on a horse?
|
|
Karsten Hopp |
9b98e5 |
ARTHUR: Yes!
|
|
Karsten Hopp |
9b98e5 |
SOLDIER: You're using coconuts!
|
|
Karsten Hopp |
9b98e5 |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
9b98e5 |
|
|
Karsten Hopp |
9b98e5 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
9b98e5 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
9b98e5 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
9b98e5 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|