Definition: Expose bool isDelimiter() const

Authored by dhaumann on Aug 11 2018, 9:48 AM.

Description

Definition: Expose bool isDelimiter() const

Summary:
Returns whether the character @p c is a word delimiter.
A delimiter defines whether a characters is a word boundary. Internally,
delimiters are used for matching keyword lists. As example, typcally the
dot '.' is a word delimiter. However, if you have a keyword in a keyword
list that contains a dot, you have to add the dot to the
@e weakDeliminator attribute of the @e general section in your
highlighting definition. Similarly, sometimes additional delimiters are
required, which can be specified in @e additionalDeliminator.

Checking whether a characters is a delimiter is useful for instance if
text is selected with double click. Typically, the whole word should be
selected in this case. Similarly to the example above, the dot '.'
usually acts as word delimiter. However, using this function you can
implement text selection in such a way that keyword lists are correctly
selected.

Test Plan: make && make test, unit test still missing

Reviewers: cullmann, vkrause

Reviewed By: cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: Kate, Frameworks

Differential Revision: https://phabricator.kde.org/D14741

Details

Committed
dhaumannAug 11 2018, 11:51 AM
Reviewer
cullmann
Differential Revision
D14741: Definition: Expose bool isDelimiter() const
Parents
R216:e23573cc90f3: Sort returned formats in Definition::formats() by id
Branches
Unknown
Tags
Unknown