on master help sign in
Stop completion of names that are prefixes of others
1617dd3David Christiansen
src/Idris/Completion.hs+1−1
@@ -103,7 +103,7 @@ completeWith ns n = if uniqueExists
103 then [simpleCompletion n]
103 then [simpleCompletion n]
104 else map simpleCompletion prefixMatches
104 else map simpleCompletion prefixMatches
105 where prefixMatches = filter (isPrefixOf n) ns
105 where prefixMatches = filter (isPrefixOf n) ns
106− uniqueExists = n `elem` prefixMatches
106+ uniqueExists = [n] == prefixMatches
107
107
108completeName :: [String] -> String -> Idris [Completion]
108completeName :: [String] -> String -> Idris [Completion]
109completeName extra n = do ns <- names
109completeName extra n = do ns <- names