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

Ahmad Samir noreply at phabricator.kde.org
Thu Jul 4 17:21:37 BST 2019


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 line with the same indentation as
  the previous line, which makes sense when writing code. But there
  is a viable use case where a user may want to insert a new line to
  separate blocks of code that have different context/functionality
  inside a function, in that case that line should be non-indented,
  having trailing spaces on an empty line isn't good, IMHO.
  
  The new action can be triggered with Ctrl+Enter. And the current
  default behaviour is preserved.
  
  BUG: 314395
  FIXED-IN: 5.61.0

TEST PLAN
  - Open a file with some C++ code, put the cursor at the end of an indented line, and press Enter to insert a new line
  - Note that the new line is indented
  - Repeat the first step, but press Ctrl+Enter; the newly inserted line has no indentation

REPOSITORY
  R39 KTextEditor

BRANCH
  regular-newline (branched from master)

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

AFFECTED FILES
  src/document/katedocument.cpp
  src/document/katedocument.h
  src/view/kateview.cpp
  src/view/kateview.h

To: ahmadsamir, #ktexteditor, cullmann, dhaumann
Cc: kde-frameworks-devel, kwrite-devel, LeGast00n, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190704/c9c4d235/attachment.html>


More information about the KWrite-Devel mailing list