<table><tr><td style="">dhaumann added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D26560">View Revision</a></tr></table><br /><div><div><p>That looks already better: If a line is wrapped and on the same page, then only the selected text is printed. It seems there are still corner cases.</p>
<ol class="remarkup-list">
<li class="remarkup-list-item">Create a document with just one long line that wraps over two printed pages. I this case, I am not able to print only the selected text properly.</li>
<li class="remarkup-list-item">Say you have a line that wraps over e.g. 5 visual lines. And you just want to print the visually wrapped line 4 and 5. Right now, the visual lines 1-3 are just empty, but still take place. Maybe it makes sense to omit fully empty lines completely?</li>
</ol>
<p>Can you reproduce this? I know this is tricky, so I'd be fine with committing the code as is. Or are you willing to put more efforts into 1. and/or 2. ? :-)</p>
<p>In any case, this is already very much appreciated.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26560">https://phabricator.kde.org/D26560</a></div></div><br /><div><strong>To: </strong>hoffmannrobert, dhaumann<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, rrosch, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>