Package: ding / 1.9-2

03_best_match.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Roland Rosenfeld <roland@debian.org>
Date: Sun, 6 Jan 2002 15:05:57 +0100
Subject: Use -w (complete words) option on agrep, when "best match" is enabled,
 too (upstream disables -w when "best match" is enabled, which seems to
 be a bad idea) (Closes: #127317).
Bug-Debian: http://bugs.debian.org/127317
Forwarded: To Frank Richter <frank.richter@hrz.tu-chemnitz.de> by mail on Fri, 7 Oct 2005 21:18:19 +0200

--- a/ding
+++ b/ding
@@ -2893,9 +2893,9 @@ proc dictsearch {query args} {
     } elseif {[string match "*grep" $searchmeth($curr,grepcmd)]} {
         # grep family
         set isgrep 1
-        if {$opts(word) == 0 && ![regexp {[.| ]} $squery] && $opts(errors) != -1} {
+        if {$opts(word) == 0 && ![regexp {[.| ]} $squery]} {
             # words only search - makes no sense if search string contains
-            # white space, or when "best match" used
+            # white space
             set opt "$opt -w"
         }
         if {$opts(case) == 0} {