D22276: Add an action to insert a non-indented newline

2019-07-08 Thread Christoph Cullmann
cullmann added a comment. Thanks for the patch! REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D22276 To: ahmadsamir, #ktexteditor, cullmann, dhaumann Cc: bruns, mickaelbo, kde-frameworks-devel, kwrite-devel, LeGast00n, domson, michaelh, ngraham, demsking, cullma

D22276: Add an action to insert a non-indented newline

2019-07-08 Thread Christoph Cullmann
cullmann accepted this revision. This revision is now accepted and ready to land. REPOSITORY R39 KTextEditor BRANCH regular-newline (branched from master) REVISION DETAIL https://phabricator.kde.org/D22276 To: ahmadsamir, #ktexteditor, cullmann, dhaumann Cc: bruns, mickaelbo, kde-framewor

D22276: Add an action to insert a non-indented newline

2019-07-08 Thread Christoph Cullmann
This revision was automatically updated to reflect the committed changes. Closed by commit R39:01526bfcb7e8: Add an action to insert a non-indented newline (authored by ahmadsamir, committed by cullmann). REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D22276

D22276: Add an action to insert a non-indented newline

2019-07-08 Thread Ahmad Samir
ahmadsamir added a comment. If this is OK, please commit it too. Thanks. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D22276 To: ahmadsamir, #ktexteditor, cullmann, dhaumann Cc: bruns, mickaelbo, kde-frameworks-devel, kwrite-devel, LeGast00n, domson, micha

D22276: Add an action to insert a non-indented newline

2019-07-08 Thread Ahmad Samir
ahmadsamir updated this revision to Diff 61373. ahmadsamir added a comment. Fix action name, don't use camel case, use _ Fix comment indentation :) REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D22276?vs=61363&id=61373 BRANCH regular-newline (branch

D22276: Add an action to insert a non-indented newline

2019-07-08 Thread Christoph Cullmann
cullmann requested changes to this revision. cullmann added a comment. This revision now requires changes to proceed. Please fix the // second: if "indent" is true, indent the new line, if needed... comment and use some non-camel-case action name like no_indent_newline. Then this

D22276: Add an action to insert a non-indented newline

2019-07-08 Thread Ahmad Samir
ahmadsamir updated this revision to Diff 61363. ahmadsamir added a comment. Use an Enum instead of bool REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D22276?vs=61156&id=61363 BRANCH regular-newline (branched from master) REVISION DETAIL https://pha

D22276: Add an action to insert a non-indented newline

2019-07-08 Thread Christoph Cullmann
cullmann requested changes to this revision. cullmann added a comment. This revision now requires changes to proceed. I think, once there is no bool but some enum, one can push this as is. If one wants to remove the updateView()... glibberish can be decided later, it is ok that this is a 1:1

D22276: Add an action to insert a non-indented newline

2019-07-05 Thread Ahmad Samir
ahmadsamir added inline comments. INLINE COMMENTS > dhaumann wrote in katedocument.h:827 > I dislike the double negation: noIndentation = false. Later even > !noIndentation. This is bad API design. > > Please change to bool indent = true. Noted. Although I'll use an enum per cullmann's recomme

D22276: Add an action to insert a non-indented newline

2019-07-05 Thread Christoph Cullmann
cullmann added inline comments. INLINE COMMENTS > dhaumann wrote in kateview.cpp:2881 > Do we really need this call? Also Don't we miss setting the cursor position? > Incliding a begin/endEdit? I assume this is just copied from the normal void KTextEditor::ViewPrivate::keyReturn() { doc()->

D22276: Add an action to insert a non-indented newline

2019-07-05 Thread Stefan BrĂ¼ns
bruns added a comment. In D22276#491055 , @mickaelbo wrote: > Another way to avoid indented empty line is to clear the trailing spaces/indentation when pressing enter while the cursor is at the end of a line containing only spaces or \t. This c

D22276: Add an action to insert a non-indented newline

2019-07-05 Thread Dominik Haumann
dhaumann added inline comments. INLINE COMMENTS > katedocument.h:827 > > -void newLine(KTextEditor::ViewPrivate *view); // Changes input > +void newLine(KTextEditor::ViewPrivate *view, const bool noIndentation = > false); // Changes input > void backspace(KTextEditor::ViewPrivat

D22276: Add an action to insert a non-indented newline

2019-07-04 Thread Christoph Cullmann
cullmann added a comment. I think this is no bad idea. About the default shortcuts I am not sure. For the code: I would prefer a enum instead of a bool, to make it more clear what it does. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D22276 To: ahmadsamir,

D22276: Add an action to insert a non-indented newline

2019-07-04 Thread Mickael Bosch
mickaelbo added a comment. Another way to avoid indented empty line is to clear the trailing spaces/indentation when pressing enter while the cursor is at the end of a line containing only spaces or \t. This can lead to a nightmare though if someone want to keep trailing spaces... REPOSITOR

D22276: Add an action to insert a non-indented newline

2019-07-04 Thread Ahmad Samir
ahmadsamir added a comment. Ctrl+Enter/Return may be a too common shortcut, i.e. users probably have it already mapped to do something, so maybe we shouldn't set a default shortcut for that action... REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D22276 To: ahma

D22276: Add an action to insert a non-indented newline

2019-07-04 Thread Ahmad Samir
ahmadsamir created this revision. ahmadsamir added reviewers: KTextEditor, cullmann, dhaumann. Herald added projects: Kate, Frameworks. ahmadsamir requested review of this revision. REVISION SUMMARY Currently pressing Enter to insert a new line, KTextEditor will, in most cases, indent the new