From 88ae03bcdb8992fd91a3efdb61dbd7e2aa395eff Mon Sep 17 00:00:00 2001 From: Lukas Reineke Date: Fri, 25 Dec 2020 01:33:52 +0900 Subject: feat(sign):Allow signs to be 0 width (#13290) Adds support for signs to be 0 cells wide. If all signs of the same group have no width, the signcolumn will not be rendered for that group. --- src/nvim/buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/nvim/buffer.c') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index f40ebaad90..a8cb90ff0e 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -5479,7 +5479,9 @@ int buf_signcols(buf_T *buf) curline = sign->lnum; linesum = 0; } - linesum++; + if (sign->has_text_or_icon) { + linesum++; + } } if (linesum > buf->b_signcols_max) { buf->b_signcols_max = linesum; -- cgit