Bug 391208

Summary: Kwrite needlessly asks whether to save or discard changes
Product: [Applications] kate Reporter: Zakhar <zakhar.nasimov>
Component: kwriteAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 5.81
Sentry Crash Report:

Description Zakhar 2018-02-28 05:10:30 UTC
Steps to reproduce:
-Open Kwrite
-Type some letters
-Delete everything
-Close Kwrite

Results: Kwrite asks if you want to save or discard changes when there is nothing to save or discard.
Comment 1 Christoph Cullmann 2018-08-17 09:51:33 UTC
That is actually not that correct.
Wheres we could define "untitled document with no text" as some case to skip that question, you still have stuff in your undo-buffer you will loose and some people will complain if we don't inform them in that case.
Therefore I think we want to keep this behavior.
Comment 2 Christoph Cullmann 2021-03-26 20:02:26 UTC
Git commit 1274d1d59f3f601946fb5bc8e1a60b8c7478c3ec by Christoph Cullmann, on behalf of Nate Graham.
Committed on 26/03/2021 at 20:01.
Pushed by cullmann into branch 'master'.

Don't warn about unsaved changes when closing if blank and unsaved

In the case where the document is marked as modified, but is both blank
and unsaved, there's no reason to pester the user about unsaved changes
because there are no unsaved changes. So in this case, let's not bug
them about it.
FIXED-IN: 5.81

M  +4    -1    src/document/katedocument.cpp

https://invent.kde.org/frameworks/ktexteditor/commit/1274d1d59f3f601946fb5bc8e1a60b8c7478c3ec