PreviousNextTracker indexSee it online !

(114/212) 315 - Undo "File reload" action

It would be great and very useful, if the "Reload file" action would not clear the Undo buffer, but add "Replaced the whole text" to the stack instead.

This can be a real time saver\! (e.g. if curl overwrites your file with the result of it...\!)

Submitted blueyed - 2009-10-15 16:08:59 Assigned
Priority 5 Labels core
Status open Group None
Resolution None

Comments

2009-10-15 16:09:21
blueyed

- **labels**: --> core

2009-11-02 00:37:22
ghostfly

Does anyone know why the reload method just reuses the load method in the first place? You get some other side effect stuff with load like completely clearing out the Buffer state. It seems like doing a compound edit of removing all text then insert from file contents would be acceptable.

2009-11-02 20:04:05
rschwenn

Answer to the last question:
I'd think that reload means "just load it again". When I reload a buffer, I expect the same behavior of jedit like loading a file the first time - inclusive all side effects like setting edit mode, indent mode ...

2010-01-03 21:56:15
*anonymous

What you suggest might be useful rarely, on the other hand it will can be very expensive in memory. If at all, I'd suggest adding a new action for this. But do you know other editors / IDEs that do that? I don't think undoing a reload is a common thing.