]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.178 v7.4.178
authorBram Moolenaar <Bram@vim.org>
Tue, 11 Feb 2014 18:33:07 +0000 (19:33 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 11 Feb 2014 18:33:07 +0000 (19:33 +0100)
Problem:    The J command does not update '[ and '] marks. (William Gardner)
Solution:   Set the marks. (Christian Brabandt)

src/ops.c
src/version.c

index 66b9b594969d9925f4834e8dc125fc069589d5f0..8505f64a5b3e13de92fd7fe615d0468443453ab6 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -4452,6 +4452,12 @@ do_join(count, insert_space, save_undo, use_formatoptions)
     for (t = 0; t < count; ++t)
     {
        curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
+       if (t == 0)
+       {
+           /* Set the '[ mark. */
+           curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
+           curwin->w_buffer->b_op_start.col  = (colnr_T)STRLEN(curr);
+       }
 #if defined(FEAT_COMMENTS) || defined(PROTO)
        if (remove_comments)
        {
@@ -4568,6 +4574,10 @@ do_join(count, insert_space, save_undo, use_formatoptions)
     }
     ml_replace(curwin->w_cursor.lnum, newp, FALSE);
 
+    /* Set the '] mark. */
+    curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
+    curwin->w_buffer->b_op_end.col  = (colnr_T)STRLEN(newp);
+
     /* Only report the change in the first line here, del_lines() will report
      * the deleted line. */
     changed_lines(curwin->w_cursor.lnum, currsize,
index 3a95f317e917af5a877c388b128682b7039a9469..16b2ea4e01065590eb49aa75db8ec498e48a40e2 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    178,
 /**/
     177,
 /**/