aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroni-link <knil.ino@gmail.com>2014-04-03 13:37:06 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-06 11:31:12 -0300
commit461b939b012c2b9ae46fc610b666af6e6e264095 (patch)
tree5ef295d74e62fa3bf5f4ebe314c0ecc6bc2f0ad5 /src
parenta02bcc0d2f1692722f5c2ae7240b8e66648e5360 (diff)
downloadrneovim-461b939b012c2b9ae46fc610b666af6e6e264095.tar.gz
rneovim-461b939b012c2b9ae46fc610b666af6e6e264095.tar.bz2
rneovim-461b939b012c2b9ae46fc610b666af6e6e264095.zip
vim-patch:7.4.178
Problem: The J command does not update '[ and '] marks. (William Gardner) Solution: Set the marks. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=647e6bb15aa3f864eaf447fe77e3e3ae7e37b134
Diffstat (limited to 'src')
-rw-r--r--src/ops.c9
-rw-r--r--src/version.c5
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ops.c b/src/ops.c
index 06ce1b0ba9..b26923a728 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3528,6 +3528,11 @@ int do_join(long count, int insert_space, int save_undo, int 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 (remove_comments) {
/* We don't want to remove the comment leader if the
* previous line is not a comment. */
@@ -3623,6 +3628,10 @@ int do_join(long count, int insert_space, int save_undo, int 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 a80bf9f1fa..33fb3ca6cc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -202,6 +202,11 @@ static char *(features[]) = {
static int included_patches[] = {
// Add new patch number below this line
+ 178,
+ //177,
+ //176,
+ //175,
+ //174,
173,
172,
171,