diff options
author | Russ Cox <rsc@swtch.com> | 2011-07-10 20:35:23 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2011-07-10 20:35:23 -0400 |
commit | 67afaf385afa5a2bcc6b7640d7cec6cd5d17863e (patch) | |
tree | 5df6886151658a6eb9910768464c87d79ad9151c | |
parent | ff4512ee906ba02533eb86442ce95862a443f1d2 (diff) | |
download | plan9port-67afaf385afa5a2bcc6b7640d7cec6cd5d17863e.tar.gz plan9port-67afaf385afa5a2bcc6b7640d7cec6cd5d17863e.tar.bz2 plan9port-67afaf385afa5a2bcc6b7640d7cec6cd5d17863e.zip |
acme: allow :?regexp for backward search
Fixes issue 80.
R=rsc
http://codereview.appspot.com/4662088
-rw-r--r-- | src/cmd/acme/look.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/acme/look.c b/src/cmd/acme/look.c index aec850b8..813fd19b 100644 --- a/src/cmd/acme/look.c +++ b/src/cmd/acme/look.c @@ -776,6 +776,10 @@ openfile(Text *t, Expand *e) else{ eval = TRUE; r = address(TRUE, t, range(-1,-1), range(t->q0, t->q1), e->u.at, e->a0, e->a1, e->agetc, &eval, &dummy); + if(r.q0 > r.q1) { + eval = FALSE; + warning(nil, "addresses out of order\n"); + } if(eval == FALSE) e->jump = FALSE; /* don't jump if invalid address */ } |