D17949: ViewPrivate: Make 'Apply Word Wrap' more comfortable

Milian Wolff noreply at phabricator.kde.org
Thu Jan 24 15:39:22 GMT 2019


mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.


  please look at the existing tests and expand that. There's e.g. `KateDocumentTest::testWordWrap` in `ktexteditor/autotests/src/katedocument_test.cpp`
  
  also don't change the behavior of wordwrapping that is used by the view compared to what we would get by calling wordwrap on the document directly

INLINE COMMENTS

> kateview.cpp:2346
>  {
> -    if (selection()) {
> -        doc()->wrapText(selectionRange().start().line(), selectionRange().end().line());
> -    } else {
> -        doc()->wrapText(0, doc()->lastLine());
> +    doc()->editStart();
> +    int first = selectionRange().start().line();

all of this functionality needs to go into the document, it shouldn't depend on the view.

REPOSITORY
  R39 KTextEditor

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

To: loh.tar, #ktexteditor, mwolff
Cc: dhaumann, cullmann, mwolff, kwrite-devel, kde-frameworks-devel, #ktexteditor, hase, michaelh, ngraham, bruns, demsking, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190124/cd1e0509/attachment.html>


More information about the KWrite-Devel mailing list