Bug 306926

Summary: files are being marked as modified on opening
Product: [Applications] kate Reporter: Barade <barade.barade>
Component: kwriteAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: mwoehlke.floss
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 4.10.0

Description Barade 2012-09-17 12:58:00 UTC
Oftenly, when I open files with kwrite they're being marked as modified although I didn't do anything to them.

Reproducible: Sometimes
Comment 1 Dominik Haumann 2012-09-23 09:07:21 UTC
Do you have the option remove trailing spaces on "Open/Save" enabled? If so, what happens if you disable it?
Comment 2 Barade 2012-09-23 19:56:21 UTC
Yes I have and I couldn't reproduce it after having disabled the option but I guess the feature shouldn't work that way. It should only apply on explicit saving, shouldn't it?
Comment 3 Dominik Haumann 2012-10-24 22:19:17 UTC
This behavior was introduced in report #239077. Whatever we do, either you or the other guy will not be content...
Comment 4 Matthew Woehlke 2012-10-25 00:01:12 UTC
IMHO: If kate(part) modifies a file on opening it, it's reasonable behavior for it to indicate that it has done so. Better I think would be to open the file and not strip it, and to consequently show that there are trailing spaces. Then remove them when saving the file, as expected. That change need not (and most likely would not) regress bug 239077.

(p.s. appreciate the ping; thanks)
Comment 5 Dominik Haumann 2012-10-25 14:59:34 UTC
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 239077

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