[Geany-devel] [PATCH 05/19] Don't be annoying when not necessary

Erik de Castro Lopo mle+tools at xxxxx
Wed Sep 15 21:54:12 UTC 2010


Colomban Wendling wrote:

> This one seems to have been applied as r5190, and I have a little
> complain about it, so perhaps it would need a little more thought.
> 
> The problem is that reloading a document not only looses unsaved
> changes, but also undo/redo stack. This is particularly annoying if you
> hit the shortcut by accident (which I unfortunately did :( ).
> So I propose to two possible solutions:
> 1) simply check whether there's possible undo/redo, and if yes, ask
> before reloading (little patch joined);

That seems sensible to me.

> 2) the solution 1 fixes my problem, but probably not (?) for somebody
> that was annoyed by this dialog like Jiří was. So, perhaps a... setting
> (!) would be useful?

Yep, and 'Always prompt on reload' option might be useful.

On a related note, I'm working on an LLVM backend for a compiler
and quote often I with have the generated LLVM code in a tab
to check how my code generation is going. Once loaded, I never
change it, however when the code changes on disk, I would like
the tab to automatically reload the version on disk.

I was thinking for this case, it the file has no changes, is
marked as read-only in geany, it would be sensible to automatically
reload it when in changes on disk. Does that sound sane to people?

Another alternative would be to have a mode that is like the current
read-only mode, but is called view mode that is like a read only
mode but with automatic reload from disk.

Thoughts?

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



More information about the Devel mailing list