Skip to content

Commit 0b7a5a7

Browse files
authored
Merge pull request #6282 from Textualize/fuzzy-match
Fuzzy match
2 parents 1df5c7d + fdacf9c commit 0b7a5a7

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## [Unreleased]
8+
## [6.9.0] - 2025-12-14
99

1010
### Added
1111

12+
- Added Solarized Dark theme https://github.com/Textualize/textual/pull/6278
1213
- Added Rosé Pine themes https://github.com/Textualize/textual/pull/6277
1314

15+
### Fixed
16+
17+
- Fixed fuzzy matcher displaying wrong matched characters with simple substring match https://github.com/Textualize/textual/pull/6282
18+
1419
## [6.8.0] - 2025-12-07
1520

1621
### Added
@@ -3234,6 +3239,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
32343239
- New handler system for messages that doesn't require inheritance
32353240
- Improved traceback handling
32363241

3242+
[6.9.0]: https://github.com/Textualize/textual/compare/v6.8.0...v6.9.0
32373243
[6.8.0]: https://github.com/Textualize/textual/compare/v6.7.1...v6.8.0
32383244
[6.7.1]: https://github.com/Textualize/textual/compare/v6.7.0...v6.7.1
32393245
[6.7.0]: https://github.com/Textualize/textual/compare/v6.6.0...v6.7.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "6.8.0"
3+
version = "6.9.0"
44
homepage = "https://github.com/Textualize/textual"
55
repository = "https://github.com/Textualize/textual"
66
documentation = "https://textual.textualize.io/"

src/textual/fuzzy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _match(
103103
score = self.score
104104
if query in candidate:
105105
# Quick exit when the query exists as a substring
106-
query_location = candidate.rfind(query)
106+
query_location = candidate.find(query)
107107
offsets = list(range(query_location, query_location + len(query)))
108108
yield (
109109
score(candidate, offsets) * (2.0 if candidate == query else 1.5),

src/textual/theme.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ def to_color_system(self) -> ColorSystem:
301301
"footer-background": "#268bd2",
302302
"footer-key-foreground": "#fdf6e3",
303303
"footer-description-foreground": "#fdf6e3",
304-
"input-selection-background": "#073642", # Base02
305-
}
304+
"input-selection-background": "#073642", # Base02
305+
},
306306
),
307307
"rose-pine": Theme(
308308
name="rose-pine",

0 commit comments

Comments
 (0)