D14741: Definition: Expose bool isDelimiter() const

Dominik Haumann 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.

REVISION 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

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  is-delimiter (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D14741

AFFECTED FILES
  src/lib/definition.cpp
  src/lib/definition.h

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...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180811/bf7270b4/attachment.html>


More information about the Kde-frameworks-devel mailing list