diff options
author | Victor Fonseca <victorcel@hotmail.com> | 2014-10-20 10:47:17 -0200 |
---|---|---|
committer | Victor Fonseca <victorcel@hotmail.com> | 2014-10-20 17:23:09 -0200 |
commit | 9097b69088d250ddb62ae47ec96b68eaef6090cd (patch) | |
tree | 8622eb8f480b5dc397865a388ba2b29236cff989 /src/nvim/buffer.c | |
parent | 1eb3dae04a8fd703dcbc6257a3cf22a460e0d967 (diff) | |
download | rneovim-9097b69088d250ddb62ae47ec96b68eaef6090cd.tar.gz rneovim-9097b69088d250ddb62ae47ec96b68eaef6090cd.tar.bz2 rneovim-9097b69088d250ddb62ae47ec96b68eaef6090cd.zip |
Fix sign column redraw
Fixed a bug introduced in SHA:aa66f2487edde49b9a5ba10cd70d706d06a94e25,
due to a misapplied patch. buf_del_sign should redraw the window if the
sign deleted was the last one in the buffer.
Also moved the curwin verification to the correct function.
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 6ce3c77c66..b76bad67f6 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -4423,8 +4423,8 @@ linenr_T buf_delsign( } /* When deleted the last sign needs to redraw the windows to remove the - * sign column. Not when curwin is NULL (this means we're exiting). */ - if (buf->b_signlist != NULL && curwin != NULL) { + * sign column. */ + if (buf->b_signlist == NULL) { redraw_buf_later(buf, NOT_VALID); changed_cline_bef_curs(); } @@ -4479,11 +4479,9 @@ void buf_delete_signs(buf_T *buf) signlist_T *next; // When deleting the last sign need to redraw the windows to remove the - // sign column. - if (buf->b_signlist != NULL) { + // sign column. Not when curwin is NULL (this means we're exiting). + if (buf->b_signlist != NULL && curwin != NULL){ redraw_buf_later(buf, NOT_VALID); - // TODO(oni-link): Is this call necessary if curwin is not a viewport - // for buf? changed_cline_bef_curs(); } |