Skip to content

Commit

Permalink
Correct wrong counting of matches.
Browse files Browse the repository at this point in the history
  • Loading branch information
mridgers committed Jul 13, 2012
1 parent 1162067 commit 195fe8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clink_dir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ function dir_match_generator(text, first, last)
-- Find dirs and add as matches.
local has_matches = 0
local mask = clink.lower(text).."*"
has_matches = has_matches + get_dir_matches(prefix, mask)
has_matches = get_dir_matches(prefix, mask)

-- If readline's -/_ mapping is on, adjust mask and check for more matches.
if clink.is_rl_variable_true("completion-map-case") then
mask = mask:gsub("_", "-")
has_matches = get_dir_matches(prefix, mask)
has_matches = has_matches + get_dir_matches(prefix, mask)
end

-- If there was no matches then add input as the match. DON'T tell readline
Expand Down

0 comments on commit 195fe8b

Please sign in to comment.