D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection
loh tar
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?
Yes
> if we only want this for, say, markdown, then it should be a per-highlightfile list of chars that trigger this special behavior
How that?
> 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`?
REPOSITORY
R39 KTextEditor
REVISION DETAIL
https://phabricator.kde.org/D17693
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...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190124/dc80a83d/attachment-0001.html>
More information about the KWrite-Devel
mailing list