D20606: Add action to toggle folding of child ranges

2019-04-23 Thread loh tar
loh.tar added a comment.


  In D20606#451744 , @mwolff wrote:
  
  > In D20606#451459 , @dhaumann 
wrote:
  >
  > > I would prefer a context menu that has this as action. This is much 
better discoverable and also extensible with more folding actions.
  >
  >
  > I agree. Right-click should show a context menu. Middle-click could toggle, 
if you need it.
  
  
  Me wrote:
  
  > But a context menu on the icon border would I very much dislike. Middle 
click is not so handy and perform atm "paste to begin of line"
  
  Well, as long the menu works everywhere but not the folding area, may that 
indeed not so bad. There could also be actions to toggle the visibility of 
parts of the border. 
  Or you make the current right-click the left-click action. That may even more 
handy and give current left-click the middle button.

REPOSITORY
  R39 KTextEditor

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

To: loh.tar, #ktexteditor, cullmann, ngraham, dhaumann
Cc: mwolff, kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, 
ngraham, bruns, demsking, cullmann, sars, dhaumann


D20606: Add action to toggle folding of child ranges

2019-04-20 Thread loh tar
This revision was automatically updated to reflect the committed changes.
Closed by commit R39:5c83e29561e3: Add action to toggle folding of child ranges 
(authored by loh.tar).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D20606?vs=56527=56624#toc

REPOSITORY
  R39 KTextEditor

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D20606?vs=56527=56624

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

AFFECTED FILES
  src/data/katepart5ui.rc
  src/document/katebuffer.cpp
  src/document/katebuffer.h
  src/view/kateview.cpp
  src/view/kateview.h
  src/view/kateviewhelpers.cpp
  src/view/kateviewinternal.cpp

To: loh.tar, #ktexteditor, cullmann, ngraham, dhaumann
Cc: mwolff, kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, 
ngraham, bruns, demsking, cullmann, sars, dhaumann


D20606: Add action to toggle folding of child ranges

2019-04-19 Thread Christoph Cullmann
cullmann accepted this revision.
cullmann added a comment.
This revision is now accepted and ready to land.


  Given we have no actions and some more proper documentation, I am in favor of 
this.
  
  I would remove the two asserts here:
  
  Q_ASSERT(startLine >= 0);
  
Q_ASSERT(startLine < lines());
if (startLine < 0 || startLine >= lines()) {
return KTextEditor::Range::invalid();
}
  
  I think range checking + invalid range as result is good enough.

REPOSITORY
  R39 KTextEditor

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

To: loh.tar, #ktexteditor, cullmann, ngraham, dhaumann
Cc: mwolff, kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, 
ngraham, bruns, demsking, cullmann, sars, dhaumann


D20606: Add action to toggle folding of child ranges

2019-04-18 Thread loh tar
loh.tar marked an inline comment as done.

REPOSITORY
  R39 KTextEditor

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

To: loh.tar, #ktexteditor, cullmann, ngraham, dhaumann
Cc: mwolff, kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, 
ngraham, bruns, demsking, cullmann, sars, dhaumann


D20606: Add action to toggle folding of child ranges

2019-04-18 Thread loh tar
loh.tar updated this revision to Diff 56527.
loh.tar retitled this revision from "Toggle folding of child ranges by right 
click" to "Add action to toggle folding of child ranges".
loh.tar edited the summary of this revision.
loh.tar set the repository for this revision to R39 KTextEditor.
loh.tar added a comment.


  - Add menu action
  - Replace old two actions "Fold/Unfold Current Node" by "Toggle Current Node"
  - Move logic to ViewPrivate
  - KateBuffer: Add checks where they should be

REPOSITORY
  R39 KTextEditor

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D20606?vs=56444=56527

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

AFFECTED FILES
  src/data/katepart5ui.rc
  src/document/katebuffer.cpp
  src/document/katebuffer.h
  src/view/kateview.cpp
  src/view/kateview.h
  src/view/kateviewhelpers.cpp
  src/view/kateviewinternal.cpp

To: loh.tar, #ktexteditor, cullmann, ngraham, dhaumann
Cc: mwolff, kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, 
ngraham, bruns, demsking, cullmann, sars, dhaumann