D14741: Definition: Expose bool isDelimiter() const
noreply at phabricator.kde.org
Sat Aug 11 11:18:58 BST 2018
dhaumann created this revision.
dhaumann added reviewers: cullmann, vkrause.
Restricted Application added projects: Kate, Frameworks.
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel.
dhaumann requested review of this revision.
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
make && make test, unit test still missing
R216 Syntax Highlighting
is-delimiter (branched from master)
To: dhaumann, cullmann, vkrause
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel