Check for edited files (and potential information loss) only works with disabled file.keep_edit_history_on_reload.
This is intended behaviour, the edit history includes the reload, so if history is kept the reload can be undone, so there is no loss of information.
But current code reload changed files without confirmation dialog.
That check was probably meant to be something like: `if (doc->changed || file_prefs.keep_edit_history_on_reload && (document_can_undo(doc) || document_can_redo(doc)))`
The intention is to reload files without confirmation if its possible to undo the reload. This is to support use-cases like git-checkout of a different branch where a lot of files change and confirming them all is quite onerous. See [here](https://github.com/geany/geany/blob/8dc51a705b0ea830796dc23bd87f582a2090e9a9...) with a convenient comment above.
That work OK for one document, but how do i know, which tabs were reloaded with unsaved documents? (or if they even were any unsaved documents)
There was a lot of argument around adding "reload all" without a prompt on _every_ buffer, not just unsaved changed buffers, because a buffer that was saved then the file changes (such as a git checkout) has no way for Geany to determine that previously saved changes are going to be lost.
Unfortunately "reload all" can cause people to lose changes, but in the end there are valid and reasonably common use-cases that it supports and users just need to be careful, "save all" or check for changed buffers before reloading all, after all they _are_ telling Geany to replace all the buffer contents and it does what its told (mostly :-).
It sounds like you might be better off disabling edit history on reload so you get prompts if your usage causes you to "reload all" with changed buffers much.
Closed #2905.
github-comments@lists.geany.org