<table><tr><td style="">loh.tar created this revision.<br />loh.tar added reviewers: cullmann, KTextEditor.<br />Herald added projects: Kate, Frameworks.<br />Herald added subscribers: kde-frameworks-devel, kwrite-devel.<br />loh.tar requested review of this revision.
</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/D19131">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This patch is very similar to <a href="https://phabricator.kde.org/D17949" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D17949</a> but in this state not a full replacement for that.</p>
<p>Here is some core function touched which need some watchfulness to make it not even worse.<br />
Here is the existing behavior what will wrapped without a selection not changed.<br />
With this patch could be <a href="https://phabricator.kde.org/D17949" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D17949</a> simplified or perhaps their extra features added here.</p>
<p>This patch has in static wrap mode the potential to re-wrap the paragraph nicely on-the-fly, similar to dynamic wrap, whereas without this patch only the current line is wrapped, but not the following, with the result that the paragraph became cluttered or the preceding line with the result that the paragraph became not optimal wrapped in some situations.</p>
<p>Looking at other code parts indicate that this behavior is/was desired but seems to got lost at sometime. See also <a href="https://phabricator.kde.org/D19051" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D19051</a>, which looks with this patch obsolete.</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">The "auto-rewrap" can only work when the text is fresh entered, not after some load from disk. Doing a join of the paragraph should trigger the needed change</li>
<li class="remarkup-list-item">The old wrapText function is now split in three functions</li>
<li class="remarkup-list-item">The new wrapLine function is very close to old code but some variables are renamed</li>
</ul>
<p>Two main issues which needs to be fixed</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Based on TextLine::isAutoWrapped. This info gets lost when you undo some change</li>
<li class="remarkup-list-item">The cursor is sometimes misplaced, see pic where the x was DELeted and should be now in line 1 in the middle of the bbbb</li>
</ul>
<p><a href="https://phabricator.kde.org/F6622028" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F6622028: pic.png</a></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/D19131">https://phabricator.kde.org/D19131</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/document/katedocument.cpp<br />
src/document/katedocument.h</div></div></div><br /><div><strong>To: </strong>loh.tar, cullmann, KTextEditor<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, KTextEditor, gennad, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>