aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorLukas Reineke <lukas.reineke@protonmail.com>2020-12-25 01:33:52 +0900
committerGitHub <noreply@github.com>2020-12-24 17:33:52 +0100
commit88ae03bcdb8992fd91a3efdb61dbd7e2aa395eff (patch)
tree14dc4b5e156bba0380f25af525afb7d2ef6125a7 /src/nvim/buffer.c
parent6c28bddfad73c527da5e5629919d617dffdea229 (diff)
downloadrneovim-88ae03bcdb8992fd91a3efdb61dbd7e2aa395eff.tar.gz
rneovim-88ae03bcdb8992fd91a3efdb61dbd7e2aa395eff.tar.bz2
rneovim-88ae03bcdb8992fd91a3efdb61dbd7e2aa395eff.zip
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.
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c4
1 files changed, 3 insertions, 1 deletions
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;