summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-14 16:01:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-14 16:01:08 -0400
commit70538dac844f00ccbdd0f2d0283fbf4e707cb84a (patch)
treeedabc638949509b2a2be2fac163f2d6500fd50ee /Git
parent61e5663097a2cf779d136b5a28500460293e9e3c (diff)
compute distance in correct direction
Diffstat (limited to 'Git')
-rw-r--r--Git/AutoCorrect.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/AutoCorrect.hs b/Git/AutoCorrect.hs
index a18bf5619..a1ef14779 100644
--- a/Git/AutoCorrect.hs
+++ b/Git/AutoCorrect.hs
@@ -34,7 +34,7 @@ fuzzymatches :: String -> (c -> String) -> [c] -> [c]
fuzzymatches input showchoice choices = fst $ unzip $
sortBy comparecost $ filter similarEnough $ zip choices costs
where
- distance v = restrictedDamerauLevenshteinDistance gitEditCosts v input
+ distance = restrictedDamerauLevenshteinDistance gitEditCosts input
costs = map (distance . showchoice) choices
comparecost a b = compare (snd a) (snd b)
similarEnough (_, cst) = cst < similarityFloor