[Differential] [Commented On] D4538: [KTextEditor] consistent conversion from/to cursor to/from coordinates

Christoph Cullmann noreply at phabricator.kde.org
Sat Feb 18 16:45:54 UTC 2017


cullmann added a comment.


  > Currently if you try to convert the cursor to coordinates and then convert these coordinates back to a cursor again, it produces an invalid cursor (-1, -1) when the original cursor is located at the end of line
  >  Converting back to cursor coordinates that have been produced by cursorToCoordinate(view->cursorPosition()) and cursorPositionCoordinates() doesn't always produce the same results as the includeBorder option doesn't seem to be used consistently.
  
  Yeah, that seems strange
  
  > Although I cannot find a test case for this, it doen't seem to make any sense the line scrollPos(max, max.column(), calledExternally); in KateViewInternal::makeVisible function. Was it supposed to be that way (ie force when the last line is not empty and not force when it is), or is it just a typo? :\ I would appreciate any reasoning about this!
  
  Hmm, I doubt anybody can remember why that is that way ;=)
  
  Could your create some minimal unit test to ensure this stays consistent?

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D4538

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: jsalatas, #frameworks, #plasma, #ktexteditor
Cc: cullmann, plasma-devel, kwrite-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170218/4ae32f31/attachment.html>


More information about the Kde-frameworks-devel mailing list