diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-05-07 16:35:08 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-05-07 16:35:08 +0200 |
commit | 0d3d5e0483ddad68d333284d988b4269674f71dd (patch) | |
tree | 127a89b2940e6707c5234f08f44d7839977786f2 /src | |
parent | 75a8d74cc22d66482a1149f004b04bcc0a8326f2 (diff) | |
download | vim-0d3d5e0483ddad68d333284d988b4269674f71dd.zip |
updated for version 7.4.277
Problem: Using ":sign unplace *" may leave the cursor in the wrong position
(Christian Brabandt)
Solution: Update the cursor position when removing all signs.
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 16 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index 3506dbb9a..3c298590c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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); - } } /* diff --git a/src/version.c b/src/version.c index 4be0e3871..4acbd9e90 100644 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 277, +/**/ 276, /**/ 275, |