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.
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.
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