D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection
noreply at phabricator.kde.org
Thu Jan 24 06:29:24 GMT 2019
loh.tar added a comment.
> the selection becomes wrapped in two ? - is that right?
> if we only want this for, say, markdown, then it should be a per-highlightfile list of chars that trigger this special behavior
> if I have foo + bar and I select the + bar part and then start typing - asdf, would I now suddenly get foo -+ bar- asdf?!
Just try it. Almost right. Due it's behavior to move the cursor at the start of the selection and to keep the selection it becomes `foo - asfd-`
> In C++ e.g. I would hate if I couldn't just select code and replace it by an operator anymore,
Hm, I see. IIRC has the highlight stuff functions to ask the type of something. So probably there is a `isOperator(QChar c)` function available. Will then try that.
If not. Would it be too annoying to type `- SPACE asdf DEL`?
To: loh.tar, #ktexteditor, cullmann
Cc: mwolff, cullmann, sars, kwrite-devel, kde-frameworks-devel, #ktexteditor, hase, michaelh, ngraham, bruns, demsking, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel