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

Thomas Martitz kugel at xxxxx
Thu Jun 25 06:04:07 UTC 2015


Am 25.06.2015 um 07:54 schrieb Lex Trotman:

>> The red indicates that the buffer is changed and unsaved, in other words the buffer is not the same as the file on disk. So clearing it on reload is the right thing.
> Well, thinking about it some more red doesn't really indicate anything
> about the buffer matching the file, just add a character and delete
> it, the buffer is the same as the disk, but it stays red.
>
> What it indicates is that there have been edit actions since the last
> file to buffer sync (save or reload).
>
>> After saving, you the indication is also cleared *and* you can undo. That's been fine since forever.
> Yes, having determined what red actually means, this makes sense and
> having reload do it too is fine.

Right, makes some sense too.

However, what to do in this case: the file is saved (clearing the red) 
and immediately reloaded? Make it red again or keep it clear?

>> I think a document message would be a fine way to transport this feature.
>>
>> "The file has been reloaded. You can revert the buffer to the previous state simply by undoing. This message will not be displayed again.
>>
>> This feature can be disabled by clicking "Always clear undo".
> I assume this sets a setting that can be edited elsewhere, since only
> allowing one shot at making such a decision is bad ("This message will
> not be displayed again"), in which case its probably good to reference
> that setting, whatever its going to be.

There is a various pref for the "keep edit history on reload" as of git 
master (on by default). "Always clear undo" would set this to off.

> I still feel its overkill, but so long as its unobtrusive and doesn't
> appear again I'm ok with it.
>
>> [ Okay ]
>> [ Always clear undo ]
>> "
>>
>> Best regards
> Somewhat OT, red is not the best choice for this since about 10% of
> males have red colour vision deficiency, and most Geany users are
> probably males.
>
>

Too bad for those 10%, but red is universal for "be careful here" / 
"something needs your attention", like traffic lights.

I think the color can be changed though gtkrc/css, too.

Best regards.


More information about the Devel mailing list