<table><tr><td style="">jsalatas updated this revision to Diff 12416.<br />jsalatas edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-zif23tqioo2b6m3/" rel="noreferrer">(Show Details)</a><br />jsalatas 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/D4947" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>According to <a href="https://phabricator.kde.org/p/cullmann/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@cullmann</a>'s and <a href="https://phabricator.kde.org/p/dhaumann/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@dhaumann</a>'s feedback created the <tt style="background: #ebebeb; font-size: 13px;">enum LineType</tt> and also renamed <tt style="background: #ebebeb; font-size: 13px;">firstVisibleLine()</tt> and <tt style="background: #ebebeb; font-size: 13px;">lastVisibleLine()</tt> to <tt style="background: #ebebeb; font-size: 13px;">firstDisplayedLine()</tt> and <tt style="background: #ebebeb; font-size: 13px;">lastDisplayedLine()</tt></p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">I'm creating a diff/patch frontend similar to Kompare but using KTextEditor to display/edit source/destination files. In order to be able to sync the scrolling positions of the two Views and also to overlay diff indicators (see screenshot), I'm exposing the following: <br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- s</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- setS</span>crollPos<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">:</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">ition:</span> scrolls the View to a cursor position<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- s</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- setHorizontalS</span>croll<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Columns:</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Position:</span> scrolls the View to a column<br />
- maxS<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">tartPos:</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">crollPosition:</span> returns the cursor position of the maximum vertical scroll position<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- start</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- firstDisplayed</span>Line: returns the first visible line in the View<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- en</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- lastDisplaye</span>dLine: returns the last visible line in the View<br />
- text<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">a</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">A</span>reaRect: returns the View's text area rectangle excluding border, scrollbars, etc.<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D4947?vs=12412&id=12416" rel="noreferrer">https://phabricator.kde.org/D4947?vs=12412&id=12416</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4947" rel="noreferrer">https://phabricator.kde.org/D4947</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/include/ktexteditor/view.h<br />
src/utils/ktexteditor.cpp<br />
src/view/kateview.cpp<br />
src/view/kateview.h</div></div></div><br /><div><strong>To: </strong>jsalatas, Frameworks, tfry, mwolff, KTextEditor<br /><strong>Cc: </strong>cullmann, dhaumann, anthonyfieroni, mwolff, kwrite-devel<br /></div>