Merge pull request #2961 from myk002/myk_case_insensitive

make FilteredList searching case insensitive by default
develop
Myk 2023-02-26 21:39:14 -08:00 committed by GitHub
commit 6433f87dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

@ -50,6 +50,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- ``dfhack.job.attachJobItem()``: allows you to attach specific items to a job
- ``dfhack.screen.paintTile()``: you can now explicitly clear the interface cursor from a map tile by passing ``0`` as the tile value
- ``widgets.Label``: token ``tile`` properties can now be functions that return a value
-@ ``widgets.FilteredList``: search key matching is now case insensitive by default
-@ ``gui.INTERIOR_FRAME``: a panel frame style for use in highlighting off interior areas of a UI
## Removed

@ -5016,7 +5016,7 @@ construction that allows filtering the list by subwords of its items.
In addition to passing through all attributes supported by List, it
supports:
:case_sensitive: If true, matching is case sensitive. Defaults to true.
:case_sensitive: If ``true``, matching is case sensitive. Defaults to ``false``.
:edit_pen: If specified, used instead of ``cursor_pen`` for the edit field.
:edit_below: If true, the edit field is placed below the list instead of above.
:edit_key: If specified, the edit field is disabled until this key is pressed.

@ -1926,7 +1926,7 @@ end
FilteredList = defclass(FilteredList, Widget)
FilteredList.ATTRS {
case_sensitive = true,
case_sensitive = false,
edit_below = false,
edit_key = DEFAULT_NIL,
edit_ignore_keys = DEFAULT_NIL,