improve word completion to use highlighting to detect word boundaries
AbandonedPublic

Authored by cullmann on Aug 24 2019, 8:08 PM.

Details

Summary

This allows better completion e.g. for Perl or PHP

BUG: 360340

Test Plan

Open some Perl script.

Type:

lala_test = 1

$lala = 2

Now type

$lal

You shall now get only "lala" as proposal

Diff Detail

Repository
R39 KTextEditor
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15592
Build 15610: arc lint + arc unit
cullmann created this revision.Aug 24 2019, 8:08 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptAug 24 2019, 8:08 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
cullmann requested review of this revision.Aug 24 2019, 8:08 PM

I am not 100% sure about the

if (c.isLetterOrNumber() || c.isMark() || c == QLatin1Char('_'))

change, but all other locations did only check for LetterOrNumber + _

dhaumann accepted this revision.Aug 25 2019, 7:03 AM

Using isInWord() is what I would have expected. It's wrong that it does not use isInWord ().

I had to read about isMark() first, but I think this is correct and we should give it a try as is.

Please commit.

This revision is now accepted and ready to land.Aug 25 2019, 7:03 AM
This revision was automatically updated to reflect the committed changes.
This revision is now accepted and ready to land.Feb 1 2020, 8:20 PM
cullmann planned changes to this revision.Feb 1 2020, 8:20 PM

Reverted atm...

cullmann abandoned this revision.Aug 11 2020, 4:22 PM

At the moment no idea how to fix that without regressions.