diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-11 19:04:55 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-11-11 19:04:55 +0000 |
commit | edcebb2ccc1d9dff61cbd2cf688598e28aa576b0 (patch) | |
tree | b481bdcdc0a131e23df132227f253f7e7b235828 /cgi.c | |
parent | 90abf6007b8853890d1204e9249848383de26416 (diff) | |
download | mandoc-edcebb2ccc1d9dff61cbd2cf688598e28aa576b0.tar.gz mandoc-edcebb2ccc1d9dff61cbd2cf688598e28aa576b0.tar.zst mandoc-edcebb2ccc1d9dff61cbd2cf688598e28aa576b0.zip |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.100 2014/10/28 17:36:19 schwarze Exp $ */ +/* $Id: cgi.c,v 1.101 2014/11/11 19:04:55 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@usta.de> @@ -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 *)); |