0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.4.178

Problem:    The J command does not update '[ and '] marks. (William Gardner)
Solution:   Set the marks. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2014-02-11 19:33:07 +01:00
parent 92dff1827a
commit f92d8a254a
2 changed files with 12 additions and 0 deletions

View File

@@ -4452,6 +4452,12 @@ do_join(count, insert_space, save_undo, use_formatoptions)
for (t = 0; t < count; ++t) for (t = 0; t < count; ++t)
{ {
curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + 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 defined(FEAT_COMMENTS) || defined(PROTO)
if (remove_comments) if (remove_comments)
{ {
@@ -4568,6 +4574,10 @@ do_join(count, insert_space, save_undo, use_formatoptions)
} }
ml_replace(curwin->w_cursor.lnum, newp, FALSE); 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 /* Only report the change in the first line here, del_lines() will report
* the deleted line. */ * the deleted line. */
changed_lines(curwin->w_cursor.lnum, currsize, changed_lines(curwin->w_cursor.lnum, currsize,

View File

@@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
178,
/**/ /**/
177, 177,
/**/ /**/