Le 18 nov. 10 à 00:53, Pavel Sanda a écrit :
The first (easy) try was to call recordUndo whenever the lfun is
not marked
readonly. However I do not like lfun relying on such behaviour from
the
dispatcher.
i didn't get why is the first solution bad. it looks less prone-to-
be-forgotten
for some corner case or in future additions.(?)
What happens if the function decides to change nothing after all? We
have a useless
undo step.
Moreover, although we can guess the type of undo that is needed, we do
not really know it.
Anyway, here is the simple patch. I can apply it if you like it.
recordUndo only applies to AtPoint lfuns, which is a bit strange. If I
remove the extra test for AtPoint flag
it will apply to all cursor-related lfuns. We can do that, but it is
an invasive change.
As you prefer.
JMarc