aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-29 19:56:45 +0800
committerGitHub <noreply@github.com>2022-03-29 19:56:45 +0800
commitba257d74b187e38cd591b2f4eb2a4f0f6483b358 (patch)
treecae03c1cf49f0fddab237a1a6f4fd4a97eb81fe3 /src
parent81d7628c3fadaa72b879b5e934d30c609d7c89f8 (diff)
downloadrneovim-ba257d74b187e38cd591b2f4eb2a4f0f6483b358.tar.gz
rneovim-ba257d74b187e38cd591b2f4eb2a4f0f6483b358.tar.bz2
rneovim-ba257d74b187e38cd591b2f4eb2a4f0f6483b358.zip
fix(decorations): do not put empty virt_text (#17872)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/screen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 48f00e1a6a..262f17cd21 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -4335,6 +4335,9 @@ static int draw_virt_text_item(buf_T *buf, int col, VirtText vt, HlMode hl_mode,
break;
}
}
+ if (!*s.p) {
+ continue;
+ }
int attr;
bool through = false;
if (hl_mode == kHlModeCombine) {