autocomplete.XYZ.ignorecase=1 ignored

30 views
Skip to first unread message

Jos

unread,
Mar 14, 2023, 4:02:53 PM3/14/23
to scite-interest
I think we lost the functionality of setting the autocomplete.XYZ.ignorecase for a specific language in the latest version(s). The code in SciTEProps.cxx  was changed to:
sval = props.GetNewExpandString("autocomplete.*.ignorecase");
autoCompleteIgnoreCase = sval == "1";
sval = props.GetNewExpandString(Join("autocomplete.", "*", ".ignorecase"));
if (sval != "")
autoCompleteIgnoreCase = sval == "1";

Which use to be:
sprintf(key, "autocomplete.%s.ignorecase", "*");
sval = props.GetNewExpandString(key);
autoCompleteIgnoreCase = sval == "1";
sprintf(key, "autocomplete.%s.ignorecase", language.c_str());
sval = props.GetNewExpandString(key);
if (sval != "")
autoCompleteIgnoreCase = sval == "1";

As you can se we lost the link to the current language.
Shouldn't this code do do it like done with callTipIgnoreCase?:
sval = FindLanguageProperty("autocomplete.*.ignorecase");
autoCompleteIgnoreCase = sval == "1";

Cheers,
Jos

Neil Hodgson

unread,
Mar 15, 2023, 1:34:53 AM3/15/23
to scite-interest
Jos:


> Shouldn't this code do do it like done with callTipIgnoreCase?:
> sval = FindLanguageProperty("autocomplete.*.ignorecase");
> autoCompleteIgnoreCase = sval == "1";

OK. I was trying to avoid fixed size buffers and sprintf and made a mistake.

Updated with FindLanguageProperty:

There are other properties with the same pattern that could be simplified.

Neil

Jos

unread,
Mar 15, 2023, 4:32:05 AM3/15/23
to scite-interest
Thanks for the quick fix Neil! :) 

Op woensdag 15 maart 2023 om 06:34:53 UTC+1 schreef Neil Hodgson:
Reply all
Reply to author
Forward
0 new messages