diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/sign.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/sign.c b/src/nvim/sign.c index 1ca0e846a9..605098fb66 100644 --- a/src/nvim/sign.c +++ b/src/nvim/sign.c @@ -126,8 +126,8 @@ static void buf_set_sign(buf_T *buf, uint32_t *id, char *group, int prio, linenr | (has_hl ? MT_FLAG_DECOR_SIGNHL : 0); DecorInline decor = { .ext = true, .data.ext = { .vt = NULL, .sh_idx = decor_put_sh(sign) } }; - extmark_set(buf, ns, id, lnum - 1, 0, -1, -1, decor, decor_flags, true, - false, true, true, NULL); + extmark_set(buf, ns, id, MIN(buf->b_ml.ml_line_count, lnum) - 1, 0, -1, -1, + decor, decor_flags, true, false, true, true, NULL); } /// For an existing, placed sign with "id", modify the sign, group or priority. |