Additional Options '-maxundosize' and '-maxredo'

Command-Line Name: -maxundosize
Database Name: maxUndoSize
Database Class: MaxUndoSize

Specifies the maximal number of bytes stored on the undo stack, only characters will be counted (the byte size of the characters), and also embedded images and windows (each embedded item will be count with byte size one). A zero or a negative value imply an unlimited number of bytes. If a positive (non-zero) number of bytes is defined, option -maxundosize will have a higher priority than option -maxundo. Setting a number of bytes less than the number of bytes currently kept on the stack will not immediately reduce the stack.

This option provides more control over the undo behavior, the implementation was very simple. The description of option -maxundo should be a bit refined to reflect the actual behavior (also in old implementation):

Command-Line Name: -maxundo
Database Name: maxUndo
Database Class: MaxUndo

Specifies the maximum number of compound undo actions on the undo stack. A zero or a negative value imply an unlimited number of compound undo actions. Setting a lower value (greater than zero) than the previous (positive) number will reduce the stack immediately.

The next option gives a better control over the undo behavior, especially for the control whether a redo is applicable.

Command-Line Name: -maxredo
Database Name: maxRedo
Database Class: MaxRedo

Specifies the maximum number of redo actions on the undo stack. A zero value will prevent any redo action, only undoes are possible. A negative value imply an unlimited number of redo actions (this is the default; note that the number of redo actions is always bound by the number of undo actions on the stack). Setting a lower positive value (including zero) than the previous (positive) number will reduce the redo stack immediately.

This option is especially useful for setting an undo stack without redo capability; this means that in practice normally only the values -1 and 0 (zero) are useful (redo capability is on or off). When using a value greater than zero, mind that as soon as the redo stack size exceeds, all the redo items on the stack must expire (and will be deleted).