diff options
author | 2001-02-12 21:51:55 +0000 | |
---|---|---|
committer | 2001-02-12 21:51:55 +0000 | |
commit | 662cf29391bc12ad87c7cf2977d44d5c1e77751f (patch) | |
tree | b30a23abf9f5e44e0239204c027a6686e6a12a56 | |
parent | Temporarily disable dlopen() support, some issues with latest OpenSSL update. (diff) | |
download | wireguard-openbsd-662cf29391bc12ad87c7cf2977d44d5c1e77751f.tar.xz wireguard-openbsd-662cf29391bc12ad87c7cf2977d44d5c1e77751f.zip |
goto-line 0 should go to the beginning of the file, not the end;
smart@monkey.org
-rw-r--r-- | usr.bin/mg/basic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mg/basic.c b/usr.bin/mg/basic.c index b4dc605fd5c..285a9cbc0b2 100644 --- a/usr.bin/mg/basic.c +++ b/usr.bin/mg/basic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: basic.c,v 1.4 2001/01/29 01:58:06 niklas Exp $ */ +/* $OpenBSD: basic.c,v 1.5 2001/02/12 21:51:55 millert Exp $ */ /* * Basic cursor motion commands. @@ -466,15 +466,15 @@ gotoline(f, n) return s; n = atoi(buf); } - if (n > 0) { - clp = lforw(curbp->b_linep); /* "clp" is first line */ + if (n >= 0) { + clp = lforw(curbp->b_linep); /* "clp" is first line */ while (--n > 0) { if (lforw(clp) == curbp->b_linep) break; clp = lforw(clp); } } else { - clp = lback(curbp->b_linep); /* clp is last line */ + clp = lback(curbp->b_linep); /* "clp" is last line */ while (n < 0) { if (lback(clp) == curbp->b_linep) break; |