[Geany-Devel] f403e7e (PR#188) - Maintain edit history on document reload

Matthew Brush mbrush at xxxxx
Thu Jun 25 00:18:56 UTC 2015

On 2015-06-24 09:30 AM, Colomban Wendling wrote:
> Le 24/06/2015 17:04, Thomas Martitz a écrit :
>> Hello
>> I have just noticed that current git, by default, doesn't prompt anymore
>> when reloading documents, even when they are changed.
>> I traced it back to the $SUBJECT commit. IMO it's fine to keep the undo
>> history on reload and not prompt, but it's not fine if the file is
>> currently modified (unsaved) and reloading throws all unsaved changes
>> away, without warning.
>> This is especially problematic because the new pref is on by default so
>> users will probably be surprised by the new, changed behavior and lose
>> some hours of work (happend to me...).
> How does it loose work?  you can undo the reload and you get your stuff
> back, don't you?

It's not super obvious you can undo because it seems like the document's 
"dirty" state is cleared, so the tab label isn't red, etc. I didn't 
realize this feature, even though I vaguely remember when it was 
committed. It seems fine, but I wouldn't have realized I could just 
undo. I usually associate file-related actions to clearing the undo 
buffer, but it might just be what I'm used to.

>> I'm asking for restoring the prompt (by default), at the very least if
>> the file is unsaved.
> Would be fine with me, as I don't think reload is something done so
> often that a confirmation would be much pain.  We could restore the
> previous confirmation behavior.

I reload a lot :)

I think the only weird behaviour besides the clearing the "dirty" state, 
is that if you are editing a file, then edit it externally, then come 
back to Geany, it rightly warns you using a nice document message, 
giving the choice to reload, overwrite or do nothing. If you press the 
toolbar reload button, it dismisses the document infobar. That's not in 
itself necessarily a bad thing, because you're basically saying "yes, i 
want to reload, go away". However, if you clicked the toolbar save 
button instead of reload, it asks Yet Again, this time with a modal 
dialog, what the document infobar is already asking, to save/overwrite 
the file. It's kind of subtle but seems a bit inconsistent, IMO.

Matthew Brush

More information about the Devel mailing list