Menu

#315 Undo "File reload" action

open
nobody
core (195)
5
2009-10-15
2009-10-15
No

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...!)

Discussion

  • daniel hahler

    daniel hahler - 2009-10-15
    • labels: --> core
     
  • Steve Gough

    Steve Gough - 2009-11-02

    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.

     
  • Robert Schwenn

    Robert Schwenn - 2009-11-02

    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 ...

     
  • Anonymous

    Anonymous - 2010-01-03

    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.

     

Log in to post a comment.