073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.277
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.277
073263
Problem:    Using ":sign unplace *" may leave the cursor in the wrong position
073263
	    (Christian Brabandt)
073263
Solution:   Update the cursor position when removing all signs.
073263
Files:	    src/buffer.c
073263
073263
073263
*** ../vim-7.4.276/src/buffer.c	2014-04-06 20:45:40.115357453 +0200
073263
--- src/buffer.c	2014-05-07 16:30:13.117150289 +0200
073263
***************
073263
*** 5525,5530 ****
073263
--- 5525,5534 ----
073263
      return;
073263
  }
073263
  
073263
+ /*
073263
+  * For an existing, placed sign "markId" change the type to "typenr".
073263
+  * Returns the line number of the sign, or zero if the sign is not found.
073263
+  */
073263
      linenr_T
073263
  buf_change_sign_type(buf, markId, typenr)
073263
      buf_T	*buf;		/* buffer to store sign in */
073263
***************
073263
*** 5693,5698 ****
073263
--- 5697,5710 ----
073263
  {
073263
      signlist_T	*next;
073263
  
073263
+     /* When deleting the last sign need to redraw the windows to remove the
073263
+      * sign column. */
073263
+     if (buf->b_signlist != NULL)
073263
+     {
073263
+ 	redraw_buf_later(buf, NOT_VALID);
073263
+ 	changed_cline_bef_curs();
073263
+     }
073263
+ 
073263
      while (buf->b_signlist != NULL)
073263
      {
073263
  	next = buf->b_signlist->next;
073263
***************
073263
*** 5711,5721 ****
073263
  
073263
      for (buf = firstbuf; buf != NULL; buf = buf->b_next)
073263
  	if (buf->b_signlist != NULL)
073263
- 	{
073263
- 	    /* Need to redraw the windows to remove the sign column. */
073263
- 	    redraw_buf_later(buf, NOT_VALID);
073263
  	    buf_delete_signs(buf);
073263
- 	}
073263
  }
073263
  
073263
  /*
073263
--- 5723,5729 ----
073263
*** ../vim-7.4.276/src/version.c	2014-05-07 15:10:17.661108310 +0200
073263
--- src/version.c	2014-05-07 16:32:06.933151285 +0200
073263
***************
073263
*** 736,737 ****
073263
--- 736,739 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     277,
073263
  /**/
073263
073263
-- 
073263
An actual excerpt from a classified section of a city newspaper:
073263
"Illiterate?  Write today for free help!"
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    ///