Bug 391208 - Kwrite needlessly asks whether to save or discard changes
Summary: Kwrite needlessly asks whether to save or discard changes
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
Depends on:
Reported: 2018-02-28 05:10 UTC by Zakhar
Modified: 2021-03-26 20:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.81


Note You need to log in before you can comment on or make changes to this bug.
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