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