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

Scintilla (794)

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


  • Nobody/Anonymous

    Fixed case-sensitivity issue

  • Neil Hodgson

    Neil Hodgson - 2006-09-01

    Logged In: YES

    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

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks