summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-02-11 19:33:07 +0100
committerBram Moolenaar <Bram@vim.org>2014-02-11 19:33:07 +0100
commitf92d8a254ac092e525049ab930924d34eca0f114 (patch)
tree2bcadc3ad5b0c50f209d7c5e81117ebffb2b22e6
parent92dff1827aa0a199bd26139982c485fe366a5727 (diff)
downloadvim-git-f92d8a254ac092e525049ab930924d34eca0f114.tar.gz
updated for version 7.4.178v7.4.178
Problem: The J command does not update '[ and '] marks. (William Gardner) Solution: Set the marks. (Christian Brabandt)
-rw-r--r--src/ops.c10
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ops.c b/src/ops.c
index 66b9b5949..8505f64a5 100644
--- 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,
diff --git a/src/version.c b/src/version.c
index 3a95f317e..16b2ea4e0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 178,
+/**/
177,
/**/
176,