The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Nazalassa on May 31, 2026, 10:18:47 AM

Title: r11993: searchable comboboxes don't work
Post by: Nazalassa on May 31, 2026, 10:18:47 AM
Filtering is done through STRICMP which only compares strings in dictionary order. Thus searching things in comboboxes does not filter according to the query string as expected. I think the intended function is strstr(), which searches for substrings, or maybe strcasestr() (case-insensitive variant) which however is non-standard.

Additionally, when typing the selection goes down the list, which is weird.

Title: Re: r11993: searchable comboboxes don't work
Post by: prissi on May 31, 2026, 11:28:32 AM
Indeed, also the making visible was strange, hidden elements shoudl stay hidden. And there is tstrcasestr; but then it matches often not the cities I expected. strstr seems to do more what one would expect.
"Ahr" matches "kein Fahrplan vorhanden" which is not what a user expected. Als "Lan" is still with this entry. See r11994
Title: Re: r11993: searchable comboboxes don't work
Post by: Nazalassa on May 31, 2026, 01:01:30 PM
In r11994 no entries are hidden, the selection just jumps to the first matching item. (I don't know if this is intentional or not)
Title: Re: r11993: searchable comboboxes don't work
Post by: prissi on May 31, 2026, 01:35:19 PM
True, so r11995 is better?
Title: Re: r11993: searchable comboboxes don't work
Post by: Nazalassa on May 31, 2026, 03:23:55 PM
Yes! It works. Thank you!