Skip to content

Commit 90c81b3

Browse files
authored
Merge pull request #1455 from dbcli/RW/fix-camel-case-fuzzy-completions
Fix CamelCase fuzzy completions
2 parents 401301c + d4739b2 commit 90c81b3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
TBD
2+
==============
3+
4+
Bug Fixes
5+
--------
6+
* Fix CamelCase fuzzy matching.
7+
8+
19
1.45.0 (2026/01/20)
210
==============
311

mycli/sqlcompleter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ def find_matches(
961961
regex = ".{0,3}?".join(map(re.escape, text))
962962
pat = re.compile(f'({regex})')
963963
under_words_text = [x for x in text.split('_') if x]
964-
case_words_text = re.split(case_change_pat, text)
964+
case_words_text = re.split(case_change_pat, last)
965965

966966
for item in collection:
967967
r = pat.search(item.lower())
@@ -980,7 +980,7 @@ def find_matches(
980980
completions.append(item)
981981
continue
982982

983-
case_words_item = re.split(case_change_pat, item.lower())
983+
case_words_item = re.split(case_change_pat, item)
984984
occurrences = 0
985985
for elt_word in case_words_text:
986986
for elt_item in case_words_item:

0 commit comments

Comments
 (0)