Permalink
Browse files

updated for version 7.4.178

Problem:    The J command does not update '[ and '] marks. (William Gardner)
Solution:   Set the marks. (Christian Brabandt)
  • Loading branch information...
1 parent e0e5dfe commit ced8fa59596af7a62a31c69bbfb6f04f49f59e18 @brammool brammool committed Feb 11, 2014
Showing with 12 additions and 0 deletions.
  1. +10 −0 src/ops.c
  2. +2 −0 src/version.c
View
10 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,
View
2 src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 178,
+/**/
177,
/**/
176,

0 comments on commit ced8fa5

Please sign in to comment.