Neil Hodgson wrote:
Kein-Hong Man:
Bracket with the following (barely tested):

  editor.UndoCollection = false
  -- edit stuff here
  editor.UndoCollection = true

   No. Turning undo collection off and on breaks the undo collection
sequence so you are no longer able to undo correctly back past that
position. Try running this macro to add "abc" to the editing buffer:

Ah, it does break pretty badly. Hiding an editing change isn't trivial after all... that's the danger with "barely tested" suggestions. ;-) I think the extra undo isn't such a bad thing 'cause I for one hate being surprised by unexpected application behaviour; a change is still a change.

If the Last Modified thing is just a date, e.g. 2006-02-04, we can let the script check the line first for a match. The target can be replaced only if the date changes, hence saving the user from some unnecessary undos. If date+time is required, well that seems a little extreme; we might be better off using CVS-style facilities.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to