Skip to content

Commit 195fe8b

Browse files
committed
Correct wrong counting of matches.
1 parent 1162067 commit 195fe8b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

clink_dir.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ function dir_match_generator(text, first, last)
5858
-- Find dirs and add as matches.
5959
local has_matches = 0
6060
local mask = clink.lower(text).."*"
61-
has_matches = has_matches + get_dir_matches(prefix, mask)
61+
has_matches = get_dir_matches(prefix, mask)
6262

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

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

0 commit comments

Comments
 (0)