Cannot be done: Undo after save
Cannot be done: Undo after save
It'd be nice if undo still worked after saving a file...
Re: Undo after save
The big-file support means undo after save cannot be implemented without copying the entire file, which would be slow.
Re: Undo after save
Just my thoughts. With planned internal script support, both modification and undo operations could be done by the same script engine:Maël wrote:The big-file support means undo after save cannot be implemented without copying the entire file, which would be slow.
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.
Re: Undo after save
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).