Undo after save

Wishlists for new functionality and features.

Undo after save

Postby valkyr » 06 Mar 2010 05:34

It'd be nice if undo still worked after saving a file...
valkyr
 
Posts: 1
Joined: 06 Mar 2010 05:32

Re: Undo after save

Postby Maël » 21 Mar 2010 16:40

The big-file support means undo after save cannot be implemented without copying the entire file, which would be slow.
Maël
Site Admin
 
Posts: 492
Joined: 12 Mar 2005 15:15
Location: Germany

Re: Undo after save

Postby DVV » 22 Mar 2010 12:45

Maël wrote:The big-file support means undo after save cannot be implemented without copying the entire file, which would be slow.

Just my thoughts. With planned internal script support, both modification and undo operations could be done by the same script engine:
1. modification -> (script) log <addr1>, <original_value1>; mov <addr1>, <new_value1>; log <addr2>, <original_value2>; mov <addr2>, <new_value2>; ...
2. undo -> (script) mov <addr1>, <original_value1>; mov <addr2>, <original_value2>; ...
The logging (i.e. remembering of the previous values) could be done by the script engine internally.
Such approach assumes all the user operations are first transformed to the internal script commands which are executed then. Of course, this may need architecture re-design of HxD.
DVV
 
Posts: 6
Joined: 17 Jan 2008 12:24

Re: Undo after save

Postby Maël » 23 Mar 2010 01:25

HxD already keeps a diff of what was added, inserted and deleted in a file. But this diff is only valid as long as the underlying file doesn't change in an unknown way (i.e. is changed by an external program). As soon as a file is saved it's unlocked thereby making it possible for other programs to change it. So undo after save isn't possible, except if you make a temporary copy of the file (which is costly when the file is big).
Maël
Site Admin
 
Posts: 492
Joined: 12 Mar 2005 15:15
Location: Germany


Return to Feature and Enhancement Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron