Bug 358553

Summary: "Open recent" entries should be added on file open rather than file close
Product: [Applications] kate Reporter: Martin Klapetek <mklapetek>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: christoph
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Martin Klapetek 2016-01-25 19:42:43 UTC
Many times has happened to me that my system crashed or something and I had to open Kate again, but everything I had opened in Kate during the crash is not in the "Open recent..." menu.

I assume that is because it is added there on the file close, but if the file is not closed properly in Kate for whatever reason, the menu remains empty.

Therefore I'd like to suggest to add the files there on the file opening event rather than closing.
Comment 1 Dominik Haumann 2016-01-26 20:15:22 UTC
Is it really on file close? Without looking into the code, I would guess a sync is missing, and that's why it's not saved on crash.
Comment 2 Martin Klapetek 2016-01-26 20:30:55 UTC
> Is it really on file close?

I actually don't know, I simply assumed so. But yeah the missing sync() makes sense.
Comment 3 Dominik Haumann 2016-01-27 06:43:38 UTC
...or it also could be, that a sync of the kate session is missing. As iirc, the recent files are per session.
Comment 4 Christoph Cullmann 2018-08-17 21:34:12 UTC

*** This bug has been marked as a duplicate of bug 336676 ***