#478 Improper case-insensitive handling in PropSet.cxx (+Fix)

Feature_Request
closed-rejected
Neil Hodgson
Scintilla (788)
1
2006-09-01
2006-08-30
Anonymous
No

Assume keywords contains "TODO" and case-sensitivity is
turned on, then TODO will not be matched with the
current code.

In WordList::InList (and a couple of other functions)
the words returned are ignorant of case-sensitivity.
If a user has case-insensitive turned on and a keyword
that is mixed case (or upper-case in my example) then
this is handline it improperly. I've redefined the
functions InList and InListAbbreviated to be (lines 95-96):
bool InList(const char *s, bool caseInsensitive = false);
bool InListAbbreviated(const char *s, const char
marker, bool caseInsensitive = false);
so that they are aware of the case sensitivity change
(most of the code is already in the functions, so it is
a minimal change). I've attached the new PropSet.cxx
as the changes are substantial enough (I feel). I have
not updated any of the case-insensitive lexers, and
this should probably be done at some point.

batman900 AT gmail DOT com

Discussion

  • Fixed case-sensitivity issue

     
    Attachments
  • Neil Hodgson
    Neil Hodgson
    2006-09-01

    Logged In: YES
    user_id=12579

    The words and wordsNoCase arrays alias the same underlying
    text, so the tolower calls in your WordList::Set remove all
    case information in the WordList. The standard Scintilla
    idiom for case insensitive keywords is to lowercase the
    keywords and also the candidate word and use InList.

     
  • Neil Hodgson
    Neil Hodgson
    2006-09-01

    • milestone: --> Feature_Request
    • priority: 5 --> 1
    • assigned_to: nobody --> nyamatongwe
    • status: open --> closed-rejected