diff options
author | Andrej Zieger <jerdna-regeiz@users.noreply.github.com> | 2019-05-20 17:29:22 +0200 |
---|---|---|
committer | Andrej Zieger <jerdna-regeiz@users.noreply.github.com> | 2019-05-26 19:32:32 +0200 |
commit | c5f3dbab3549bdf6765aaf9d123cedbf8de46e34 (patch) | |
tree | 392fc2ae4e5176f683311e4d0ac4d448e155372b /src | |
parent | fa07cc215d6c7e86e3b4b7a83d856c017a655933 (diff) | |
download | rneovim-c5f3dbab3549bdf6765aaf9d123cedbf8de46e34.tar.gz rneovim-c5f3dbab3549bdf6765aaf9d123cedbf8de46e34.tar.bz2 rneovim-c5f3dbab3549bdf6765aaf9d123cedbf8de46e34.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/sign.c | 11 |
1 files changed, 7 insertions, 4 deletions
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, |