D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-24 Thread loh tar
loh.tar added a comment. > If you want to get this behavior for Markdown Even I had mentioned Markdown as example, I would prefer to have this as general behavior. Not only because I don't know anything about that highlight stuff and can't implement it this way. I often write some

D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-24 Thread Milian Wolff
mwolff requested changes to this revision. mwolff added a comment. This revision now requires changes to proceed. Ok, that behavior you describe is bad. I would get annoyed by that, esp. since the list of chars that you use are totally language specific. If you want to get this behavior

D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-24 Thread Christoph Cullmann
cullmann added a comment. Either one would need to expose more info from the xml highlighting definitions or as poor mans fix provide some config entry to allow people themself to specify which () "" pairs the want to have handled globall with minimal defaults. REPOSITORY R39

D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-24 Thread loh tar
loh.tar added a comment. There is an `enum KSyntaxHighlighting::Theme::TextStyle::Operator` but I can't find a function to test for that. Beside that I guess it would not work anyway. If it's an operator or not need a call to some "update highlight" to investigate the context. Ideas?

D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-23 Thread loh tar
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 +

D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-23 Thread Milian Wolff
mwolff added a comment. can you say what this exactly does? from reading the code and the somewhat vague commit message, it makes me believe that when I have anything selected and then press e.g. `?` the selection becomes wrapped in two `?` - is that right? when would we ever want this?

D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-22 Thread loh tar
loh.tar updated this revision to Diff 50061. loh.tar edited the summary of this revision. loh.tar set the repository for this revision to R39 KTextEditor. loh.tar added a comment. - const QChar as value, not reference - Add , ; - + ^ ° § & just for completeness REPOSITORY R39 KTextEditor

D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-20 Thread Christoph Cullmann
cullmann requested changes to this revision. cullmann added a comment. This revision now requires changes to proceed. Played a bit with it, works reasonable. Just replace const QChar with const QChar and we let this in. REVISION DETAIL https://phabricator.kde.org/D17693 To: loh.tar,

D17693: DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection

2019-01-14 Thread loh tar
loh.tar updated this revision to Diff 49452. loh.tar retitled this revision from "DocumentPrivate: Treat angle bracket < and backtick ` also as "auto bracket" when we have a selection" to "DocumentPrivate: Treat some chars also as "auto bracket" only when we have a selection". loh.tar edited