summaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-11 19:04:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-11 19:04:55 +0000
commitc0cfd0d601c1d58cab2a03234d79d564f7bfc104 (patch)
treeb521ac81e76fc22b00567c8576d62d0208be61c5 /cgi.c
parent2c056fc7a8960253aa0b87c88175cd8cbe51af40 (diff)
downloadmandoc-c0cfd0d601c1d58cab2a03234d79d564f7bfc104.tar.gz
In man(1) mode without -a, stop searching after the first manual tree
that contained at least one match in order to not prefer mdoc(1) from ports over mdoc(7). As a bonus, this results in a speedup.
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cgi.c b/cgi.c
index c42abdca..5b17026a 100644
--- a/cgi.c
+++ b/cgi.c
@@ -977,6 +977,7 @@ pg_search(const struct req *req)
search.sec = req->q.sec;
search.outkey = "Nd";
search.argmode = req->q.equal ? ARG_NAME : ARG_EXPR;
+ search.firstmatch = 1;
paths.sz = 1;
paths.paths = mandoc_malloc(sizeof(char *));