From c5f3dbab3549bdf6765aaf9d123cedbf8de46e34 Mon Sep 17 00:00:00 2001 From: Andrej Zieger Date: Mon, 20 May 2019 17:29:22 +0200 Subject: vim-patch:8.1.0750: when the last sign is deleted the signcolumn may remain Problem: When the last sign is deleted the signcolumn may not be removed even though 'signcolumn' is "auto". Solution: When deleting the last sign redraw the buffer. (Dominique Pelle, closes vim/vim#3803, closes vim/vim#3804) https://github.com/vim/vim/commit/8144acbec33b751788a7912e2d880c083c6cfe93 --- src/nvim/sign.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/sign.c b/src/nvim/sign.c index 24ebd12e6a..9750101ac4 100644 --- a/src/nvim/sign.c +++ b/src/nvim/sign.c @@ -378,6 +378,9 @@ linenr_T buf_change_sign_type( /// Gets a sign from a given line. /// +/// Return the type number of the sign at line number 'lnum' in buffer 'buf' +/// which has the attribute specified by 'type'. Returns 0 if a sign is not +/// found at the line number or it doesn't have the specified attribute. /// @param buf Buffer in which to search /// @param lnum Line in which to search /// @param type Type of sign to look for @@ -466,7 +469,7 @@ linenr_T buf_delsign( xfree(sign); redraw_buf_line_later(buf, lnum); // Check whether only one sign needs to be deleted - // If deleting a sign with a specific identifer in a particular + // If deleting a sign with a specific identifier in a particular // group or deleting any sign at a particular line number, delete // only one sign. if (group == NULL @@ -479,8 +482,8 @@ linenr_T buf_delsign( } } - /* When deleted the last sign needs to redraw the windows to remove the - * sign column. */ + // When deleted the last sign needs to redraw the windows to remove the + // sign column. if (buf->b_signlist == NULL) { redraw_buf_later(buf, NOT_VALID); changed_cline_bef_curs(); @@ -873,7 +876,7 @@ sign_list_by_name(char_u *name) /* - * Place a sign at the specifed file location or update a sign. + * Place a sign at the specified file location or update a sign. */ int sign_place( int *sign_id, -- cgit