I would like to have a way to query the current depth of
the undo and redo stacks of a text widget.
This would allow to enable/disable contextually Undo
and Redo commands in applications.
Whether the undo stack is empty or not can be known
by querying the modified flag (although this is not
equivalent, but I can set the modified flag manually in
such a way that it is).
I have however no solution for the redo stack depth. How
can I know if it's zero or not? Currently I have to track
manually any editing in my text widget, this is
cumbersome and greatly lowers the interest of using the
embedded .text edit commands.
In summary please add a command that gives the
current depth of each stack, or at least a command that
says if the depths are zero or not.
Thanks,
Francois