tfry added a comment.

  Hi thanks for adding me in CC. My use case was saving and restoring a certain 
scroll position. Thus, what I am missing, immediately, is a way to retrieve the 
current scroll position. The proposed startLine() goes some length, here, but 
does not provide columns (in case of horizontal scrolling), as far as I can 
see. On the side of the setter functions, I wonder why there is 
scroll(To)Column(s), but apparently no equivalent for scrolling to a different 
line at the current horizontal position.
  
  Thus, I would suggest
  a) replacing
  
    int startLine() const Q_DECL_OVERRIDE;
  
  with
  
    KTextEditor::Cursor currentScrollPosition() const Q_DECL_OVERRIDE;
  
  for more flexibility.
  b) same probably for endLine(), although I'm not quite clear on the use case 
for this one.
  c) //either// add scrollToLine(), or remove scrollToColumn() (which could be 
written as
  
    scrollToPosition(KTextEditor::Cursor(x, currentScrollPosition.line())
  
  , where needed).

REPOSITORY
  R39 KTextEditor

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

To: jsalatas, #ktexteditor, #frameworks, mwolff, tfry
Cc: dhaumann, anthonyfieroni, mwolff, kwrite-devel

Reply via email to