aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--form.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/form.c b/form.c
index da115fa..805505f 100644
--- a/form.c
+++ b/form.c
@@ -481,7 +481,7 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
spos = a->start.pos;
epos = a->end.pos;
}
- if (a->start.line != a->end.line || spos > epos)
+ if (a->start.line != a->end.line || spos > epos || epos > l->len)
epos = spos;
pos = form_update_line(l, &p, spos, epos, COLPOS(l, epos) - col,
rows > 1,