diff options
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 37182e146..0d1470606 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4409,6 +4409,8 @@ get_rel_pos(wp, buf, buflen) long above; /* number of lines above window */ long below; /* number of lines below window */ + if (buflen < 3) /* need at least 3 chars for writing */ + return; above = wp->w_topline - 1; #ifdef FEAT_DIFF above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill; |