plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 2bc9a13faf0abcfa43cddc8c226b2f742b764c4a
parent d74fdb6edbedbb184de9a8230e156460cb609aa6
Author: Russ Cox <rsc@swtch.com>
Date:   Wed, 31 Jul 2013 09:15:30 -0400

acme: allow :6 in 5-line file

R=rsc
https://codereview.appspot.com/12162043

Diffstat:
Msrc/cmd/acme/addr.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/cmd/acme/addr.c b/src/cmd/acme/addr.c @@ -77,6 +77,8 @@ number(uint showerr, Text *t, Range r, int line, int dir, int size, int *evalp) if(textreadc(t, q1++) == '\n' || q1==t->file->b.nc) if(--line > 0) q0 = q1; + if(line==1 && q1==t->file->b.nc) // 6 goes to end of 5-line file + break; if(line > 0) goto Rescue; break;