D12271: Don't remove trailing whitespace from cursor line

Dominik Haumann noreply at phabricator.kde.org
Tue Apr 17 09:44:41 UTC 2018


dhaumann added a comment.


  The behavior that is proposed here was like Kate behaved before, and as result we got bug reports that not all trailing spaces were removed. So we removed this.
  
  I can see that when saving very often, this may be annoying. On the other hand, the current behavior is very deterministic: Remove trailing spaces definitely should remove ALL trailing spaces without any exceptions.
  
  As such: -2 for this patch - sorry, but we are turning in circles otherwise, changing behavior forth and back and forth and back.
  
  A config option would work, but I am against it, since in my opinion this option belongs to a category that just bloat up our already complex config dialogs.
  
  A by far better fix would be to allow the cursor to be placed behind the last text column:
  
     do_work(); |
    <--------->
  
  Note, the length of the line does not include the space after saving, still the cursor keeps its position.
  
  But here comes the challenge: Currently, Kate does not allow the cursor to be positioned behind the last valid cursor position in normal editing mode. It does work in block-selection mode, though.
  So the real / true fix would be much better, but will also be much harder.
  
  But with that background in mind, I do not think we should add poor workarounds that do not fix the real problem, sorry. So I'd reject this patch, and vote with -1 against an option, and with +1 to a proper fix that would allow the cursor position in this case to be behind the last column.

REPOSITORY
  R39 KTextEditor

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

To: sraizada, #ktexteditor
Cc: dhaumann, anthonyfieroni, #ktexteditor, #frameworks, michaelh, kevinapavew, ngraham, bruns, demsking, head7, cullmann, kfunk, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180417/b9a0fa7f/attachment.html>


More information about the Kde-frameworks-devel mailing list