summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-11-30 17:01:58 +0100
committerBram Moolenaar <Bram@vim.org>2011-11-30 17:01:58 +0100
commit0612ec8d53ccc67f886dca470c10027336be959f (patch)
tree53310ad51dcf23555c6463bfab86b2609e8f76d1 /src
parent89c7122c05c69222a22fe78f570264c6f91851b8 (diff)
downloadvim-0612ec8d53ccc67f886dca470c10027336be959f.zip
updated for version 7.3.362
Problem: ml_get error when using ":g" with folded lines. Solution: Adjust the line number for changed_lines(). (Christian Brabandt)
Diffstat (limited to 'src')
-rw-r--r--src/ex_cmds.c8
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 33021d295..e81b4a2be 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -820,7 +820,13 @@ do_move(line1, line2, dest)
curwin->w_cursor.lnum = dest + (line2 - line1) + 1;
if (line1 < dest)
- changed_lines(line1, 0, dest + num_lines + 1, 0L);
+ {
+ dest += num_lines + 1;
+ last_line = curbuf->b_ml.ml_line_count;
+ if (dest > last_line + 1)
+ dest = last_line + 1;
+ changed_lines(line1, 0, dest, 0L);
+ }
else
changed_lines(dest + 1, 0, line1 + num_lines, 0L);
diff --git a/src/version.c b/src/version.c
index 35b519885..99d6a79af 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 362,
+/**/
361,
/**/
360,