problems Undo-ing find-and-replace

Started by dave_f, December 17, 2007, 03:28:04 PM

Previous topic - Next topic

dave_f

I noticed that if I use Edit:Find to replace a target string with a substitute string, hitting Edit:Undo deletes the substitute string, but does not restore the original target string.  For that, you need to hit Undo a second time.  This is only a minor annoyance, but it does seem like one click too many.  



More troublesome - if I use the Replace All button in the Find window to replace multiple instances of a target string, then Undo is either grayed out or doesn't seem to do anything.  



thank you,



dave_f

Mac OS 10.4.11   Intel iMac

newLISP v.9.2.10

Lutz

#1
thanks for the report, will look into it



Lutz

Lutz

#2
in 9.2.11 find-replace-all in newlisp-edit.lsp now accepts undo, but still undo must be executed double, like with simple find-replace. Any suggestion how to fix this is welcome (needs in depth knowledge of the Java UndoManager object/interface)



Paste and set-text operations in Java are split into a delete and add operation and need an undo for each currently.



In undo of replace-all this produces a scary moment, after the first undo the whole editor contents disappears, then a second undo brings the text back, as it existed before replace-all.



Lutz

Lutz

#3
... looks like the double undo could be eliminated :-)



Lutz