Returns the history version for undo or redo operations.
The history version number.
If true, returns the undo version; if false, returns the redo version.