summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-08-30 19:26:22 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-08-30 19:48:29 -0700
commitb7305897f1c6d6f499003657b352ccbe6ed1faba (patch)
tree2b488196c00326620bfd7087e42d6bb4355810c9 /match.c
parent57e9b44d776259838fe44609bb717cef8caef4e1 (diff)
scoring: Prefer consecutive matches
Diffstat (limited to 'match.c')
-rw-r--r--match.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/match.c b/match.c
index ee0b066..0c50eb7 100644
--- a/match.c
+++ b/match.c
@@ -77,10 +77,10 @@ double calculate_score(const char *needle, const char *haystack, size_t *positio
#define SCORE_GAP_TRAILING -0.005
#define SCORE_GAP_INNER -0.01
#define SCORE_MATCH_CONSECUTIVE 1.0
-#define SCORE_MATCH_SLASH 1.5
-#define SCORE_MATCH_WORD 1.2
-#define SCORE_MATCH_CAPITAL 1.1
-#define SCORE_MATCH_DOT 0.8
+#define SCORE_MATCH_SLASH 0.9
+#define SCORE_MATCH_WORD 0.8
+#define SCORE_MATCH_CAPITAL 0.7
+#define SCORE_MATCH_DOT 0.6
/* Which positions are beginning of words */
char last_ch = '\0';