diff --git a/changelog.md b/changelog.md index db2b0764..f685262f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,11 @@ +TBD +============== + +Bug Fixes +-------- +* Fix CamelCase fuzzy matching. + + 1.45.0 (2026/01/20) ============== diff --git a/mycli/sqlcompleter.py b/mycli/sqlcompleter.py index 264331ac..eee9b08c 100644 --- a/mycli/sqlcompleter.py +++ b/mycli/sqlcompleter.py @@ -961,7 +961,7 @@ def find_matches( regex = ".{0,3}?".join(map(re.escape, text)) pat = re.compile(f'({regex})') under_words_text = [x for x in text.split('_') if x] - case_words_text = re.split(case_change_pat, text) + case_words_text = re.split(case_change_pat, last) for item in collection: r = pat.search(item.lower()) @@ -980,7 +980,7 @@ def find_matches( completions.append(item) continue - case_words_item = re.split(case_change_pat, item.lower()) + case_words_item = re.split(case_change_pat, item) occurrences = 0 for elt_word in case_words_text: for elt_item in case_words_item: