D20565: Ensure not to fold the end marker
Christoph Cullmann
noreply at phabricator.kde.org
Mon Apr 15 19:26:47 BST 2019
cullmann added reviewers: dhaumann, ngraham.
cullmann added a comment.
I like the idea, its nice for e.g. if then else cascades, you get then out of stuff like
if (blockwise || range.onSingleLine()) {
lineStart = range.start().column();
remainingChars = range.columnWidth();
} else if (i == range.start().line()) {
lineStart = range.start().column();
} else if (i == range.end().line()) {
remainingChars = range.end().column();
}
if (blockwise || range.onSingleLine()) {
} else if (i == range.start().line()) {
} else if (i == range.end().line()) {
}
which is still nicely readable.
Are others ok with this, too?
For the code: Perhaps one should only adjust at all, if the ranges spans more than one line, to avoid accidents.
REVISION DETAIL
https://phabricator.kde.org/D20565
To: loh.tar, #ktexteditor, cullmann, dhaumann, ngraham
Cc: kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190415/b3039631/attachment.html>
More information about the Kde-frameworks-devel
mailing list