Summary: | kate should parse modelines before removing trailing space on load | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Matthew Woehlke <mwoehlke.floss> |
Component: | part | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kate/01253aadd7337694644bd43dea5aab2ab02dd0f4 | Version Fixed In: | |
Sentry Crash Report: |
Description
Matthew Woehlke
2010-05-28 01:27:54 UTC
proposed patch here: http://reviewboard.kde.org/r/4456/ SVN commit 1158818 by mwoehlke: delay trailing-space-removal until config/variables are parsed Move removal of trailing spaces from KateTextBuffer::load to KateDocument::openFile, after config and variable parsing (which might tell us not to remove trailing space!) has been performed. Note that the removal also now goes into the undo stack; for now we're considering this a good thing. BUG: 239077 M +0 -10 buffer/katetextbuffer.cpp M +2 -0 document/katebuffer.cpp M +10 -0 document/katedocument.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1158818 This change introduced report #306926. Matthew, can you please comment on this? Are you sure? Based on my previous comment (and seems to match my recollection), it was always the case that trailing spaces are stripped immediately. Probably because it looks better? If you're asking an opinion on behavior and not for me to remember a two-year-old code change :-), I would say it is probably okay to not strip on load at all. I guess this means you also have to modify the file before you can save it to affect trailing space stripping; again, okay. (The trick, and I think this might have something to do with the current behavior, is trailing space should be visible on open, then stripped in the internal buffer also on save. ISTR that being problematic at some point, i.e. the file on disk was stripped but kate was still showing trailing spaces. I could be imagining that, though.) Git commit 01253aadd7337694644bd43dea5aab2ab02dd0f4 by Dominik Haumann. Committed on 25/10/2012 at 16:59. Pushed by dhaumann into branch 'master'. never remove trailing spaces on load This was discussed over the years again and again, and we get bug reports that criticize that files are modified directly after opening. From now on, Kate only supports the removal of trailing spaces on save, and not on load. Related: bug 306926 M +2 -2 part/dialogs/opensaveconfigwidget.ui M +2 -4 part/document/katebuffer.cpp M +0 -10 part/document/katedocument.cpp http://commits.kde.org/kate/01253aadd7337694644bd43dea5aab2ab02dd0f4 |