073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.178
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.178
073263
Problem:    The J command does not update '[ and '] marks. (William Gardner)
073263
Solution:   Set the marks. (Christian Brabandt)
073263
Files:	    src/ops.c
073263
073263
073263
*** ../vim-7.4.177/src/ops.c	2014-01-14 12:33:32.000000000 +0100
073263
--- src/ops.c	2014-02-11 19:22:46.538343647 +0100
073263
***************
073263
*** 4452,4457 ****
073263
--- 4452,4463 ----
073263
      for (t = 0; t < count; ++t)
073263
      {
073263
  	curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
073263
+ 	if (t == 0)
073263
+ 	{
073263
+ 	    /* Set the '[ mark. */
073263
+ 	    curwin->w_buffer->b_op_start.lnum = curwin->w_cursor.lnum;
073263
+ 	    curwin->w_buffer->b_op_start.col  = (colnr_T)STRLEN(curr);
073263
+ 	}
073263
  #if defined(FEAT_COMMENTS) || defined(PROTO)
073263
  	if (remove_comments)
073263
  	{
073263
***************
073263
*** 4568,4573 ****
073263
--- 4574,4583 ----
073263
      }
073263
      ml_replace(curwin->w_cursor.lnum, newp, FALSE);
073263
  
073263
+     /* Set the '] mark. */
073263
+     curwin->w_buffer->b_op_end.lnum = curwin->w_cursor.lnum;
073263
+     curwin->w_buffer->b_op_end.col  = (colnr_T)STRLEN(newp);
073263
+ 
073263
      /* Only report the change in the first line here, del_lines() will report
073263
       * the deleted line. */
073263
      changed_lines(curwin->w_cursor.lnum, currsize,
073263
*** ../vim-7.4.177/src/version.c	2014-02-11 18:58:05.102320947 +0100
073263
--- src/version.c	2014-02-11 19:23:59.722344768 +0100
073263
***************
073263
*** 740,741 ****
073263
--- 740,743 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     178,
073263
  /**/
073263
073263
-- 
073263
Eight Megabytes And Continually Swapping.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///