]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.277 v7.4.277
authorBram Moolenaar <Bram@vim.org>
Wed, 7 May 2014 14:35:08 +0000 (16:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 7 May 2014 14:35:08 +0000 (16:35 +0200)
Problem:    Using ":sign unplace *" may leave the cursor in the wrong position
            (Christian Brabandt)
Solution:   Update the cursor position when removing all signs.

src/buffer.c
src/version.c

index 3506dbb9a5ed73982ea364e5474c5dca1e05ee33..3c298590c6db856a0ae8d2f79d63fff59fcd032f 100644 (file)
@@ -5525,6 +5525,10 @@ buf_addsign(buf, id, lnum, typenr)
     return;
 }
 
+/*
+ * For an existing, placed sign "markId" change the type to "typenr".
+ * Returns the line number of the sign, or zero if the sign is not found.
+ */
     linenr_T
 buf_change_sign_type(buf, markId, typenr)
     buf_T      *buf;           /* buffer to store sign in */
@@ -5693,6 +5697,14 @@ buf_delete_signs(buf)
 {
     signlist_T *next;
 
+    /* When deleting the last sign need to redraw the windows to remove the
+     * sign column. */
+    if (buf->b_signlist != NULL)
+    {
+       redraw_buf_later(buf, NOT_VALID);
+       changed_cline_bef_curs();
+    }
+
     while (buf->b_signlist != NULL)
     {
        next = buf->b_signlist->next;
@@ -5711,11 +5723,7 @@ buf_delete_all_signs()
 
     for (buf = firstbuf; buf != NULL; buf = buf->b_next)
        if (buf->b_signlist != NULL)
-       {
-           /* Need to redraw the windows to remove the sign column. */
-           redraw_buf_later(buf, NOT_VALID);
            buf_delete_signs(buf);
-       }
 }
 
 /*
index 4be0e387118b1db4cdeafc379e4dc65caae4335f..4acbd9e90402f7a416c36337c6c247355edd8263 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    277,
 /**/
     276,
 /**/