Skip to content

Commit ced8fa5

Browse files
committed
updated for version 7.4.178
Problem: The J command does not update '[ and '] marks. (William Gardner) Solution: Set the marks. (Christian Brabandt)
1 parent e0e5dfe commit ced8fa5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/ops.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4452,6 +4452,12 @@ do_join(count, insert_space, save_undo, use_formatoptions)
44524452
for (t = 0; t < count; ++t)
44534453
{
44544454
curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
4455+
if (t == 0)
4456+
{
4457+
/* Set the '[ mark. */
4458+
curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
4459+
curwin->w_buffer->b_op_start.col = (colnr_T)STRLEN(curr);
4460+
}
44554461
#if defined(FEAT_COMMENTS) || defined(PROTO)
44564462
if (remove_comments)
44574463
{
@@ -4568,6 +4574,10 @@ do_join(count, insert_space, save_undo, use_formatoptions)
45684574
}
45694575
ml_replace(curwin->w_cursor.lnum, newp, FALSE);
45704576

4577+
/* Set the '] mark. */
4578+
curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
4579+
curwin->w_buffer->b_op_end.col = (colnr_T)STRLEN(newp);
4580+
45714581
/* Only report the change in the first line here, del_lines() will report
45724582
* the deleted line. */
45734583
changed_lines(curwin->w_cursor.lnum, currsize,

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
178,
741743
/**/
742744
177,
743745
/**/

0 commit comments

Comments
 (0)