Karsten Hopp 018270
To: vim_dev@googlegroups.com
Karsten Hopp 018270
Subject: Patch 7.4.277
Karsten Hopp 018270
Fcc: outbox
Karsten Hopp 018270
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 018270
Mime-Version: 1.0
Karsten Hopp 018270
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 018270
Content-Transfer-Encoding: 8bit
Karsten Hopp 018270
------------
Karsten Hopp 018270
Karsten Hopp 018270
Patch 7.4.277
Karsten Hopp 018270
Problem:    Using ":sign unplace *" may leave the cursor in the wrong position
Karsten Hopp 018270
	    (Christian Brabandt)
Karsten Hopp 018270
Solution:   Update the cursor position when removing all signs.
Karsten Hopp 018270
Files:	    src/buffer.c
Karsten Hopp 018270
Karsten Hopp 018270
Karsten Hopp 018270
*** ../vim-7.4.276/src/buffer.c	2014-04-06 20:45:40.115357453 +0200
Karsten Hopp 018270
--- src/buffer.c	2014-05-07 16:30:13.117150289 +0200
Karsten Hopp 018270
***************
Karsten Hopp 018270
*** 5525,5530 ****
Karsten Hopp 018270
--- 5525,5534 ----
Karsten Hopp 018270
      return;
Karsten Hopp 018270
  }
Karsten Hopp 018270
  
Karsten Hopp 018270
+ /*
Karsten Hopp 018270
+  * For an existing, placed sign "markId" change the type to "typenr".
Karsten Hopp 018270
+  * Returns the line number of the sign, or zero if the sign is not found.
Karsten Hopp 018270
+  */
Karsten Hopp 018270
      linenr_T
Karsten Hopp 018270
  buf_change_sign_type(buf, markId, typenr)
Karsten Hopp 018270
      buf_T	*buf;		/* buffer to store sign in */
Karsten Hopp 018270
***************
Karsten Hopp 018270
*** 5693,5698 ****
Karsten Hopp 018270
--- 5697,5710 ----
Karsten Hopp 018270
  {
Karsten Hopp 018270
      signlist_T	*next;
Karsten Hopp 018270
  
Karsten Hopp 018270
+     /* When deleting the last sign need to redraw the windows to remove the
Karsten Hopp 018270
+      * sign column. */
Karsten Hopp 018270
+     if (buf->b_signlist != NULL)
Karsten Hopp 018270
+     {
Karsten Hopp 018270
+ 	redraw_buf_later(buf, NOT_VALID);
Karsten Hopp 018270
+ 	changed_cline_bef_curs();
Karsten Hopp 018270
+     }
Karsten Hopp 018270
+ 
Karsten Hopp 018270
      while (buf->b_signlist != NULL)
Karsten Hopp 018270
      {
Karsten Hopp 018270
  	next = buf->b_signlist->next;
Karsten Hopp 018270
***************
Karsten Hopp 018270
*** 5711,5721 ****
Karsten Hopp 018270
  
Karsten Hopp 018270
      for (buf = firstbuf; buf != NULL; buf = buf->b_next)
Karsten Hopp 018270
  	if (buf->b_signlist != NULL)
Karsten Hopp 018270
- 	{
Karsten Hopp 018270
- 	    /* Need to redraw the windows to remove the sign column. */
Karsten Hopp 018270
- 	    redraw_buf_later(buf, NOT_VALID);
Karsten Hopp 018270
  	    buf_delete_signs(buf);
Karsten Hopp 018270
- 	}
Karsten Hopp 018270
  }
Karsten Hopp 018270
  
Karsten Hopp 018270
  /*
Karsten Hopp 018270
--- 5723,5729 ----
Karsten Hopp 018270
*** ../vim-7.4.276/src/version.c	2014-05-07 15:10:17.661108310 +0200
Karsten Hopp 018270
--- src/version.c	2014-05-07 16:32:06.933151285 +0200
Karsten Hopp 018270
***************
Karsten Hopp 018270
*** 736,737 ****
Karsten Hopp 018270
--- 736,739 ----
Karsten Hopp 018270
  {   /* Add new patch number below this line */
Karsten Hopp 018270
+ /**/
Karsten Hopp 018270
+     277,
Karsten Hopp 018270
  /**/
Karsten Hopp 018270
Karsten Hopp 018270
-- 
Karsten Hopp 018270
An actual excerpt from a classified section of a city newspaper:
Karsten Hopp 018270
"Illiterate?  Write today for free help!"
Karsten Hopp 018270
Karsten Hopp 018270
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 018270
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 018270
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 018270
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///