diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/acme/text.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c index 463db9ff..c537d277 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -725,6 +725,10 @@ texttype(Text *t, Rune r) case Kend: typecommit(t); if(t->iq1 > t->org+t->fr.nchars) { + if(t->iq1 > t->file->b.nc) { + // should not happen, but does. and it will crash textbacknl. + t->iq1 = t->file->b.nc; + } q0 = textbacknl(t, t->iq1, 1); textsetorigin(t, q0, TRUE); } else |