9 writes to _topUndoIndex
PresentationFramework (9)
src\Framework\MS\Internal\Documents\UndoManager.cs (9)
86
_topUndoIndex
= -1;
468
if (++
_topUndoIndex
== UndoLimit)
470
_topUndoIndex
= 0;
758
_topUndoIndex
= undoStack.Count - 1;
800
_topUndoIndex
= UndoLimit - 1;
1001
_topUndoIndex
-= count;
1159
_topUndoIndex
= -1;
1167
UndoStack[
_topUndoIndex
--] = null;
1171
_topUndoIndex
= UndoLimit - 1; // This should never be possible with an unlimited stack
22 references to _topUndoIndex
PresentationFramework (22)
src\Framework\MS\Internal\Documents\UndoManager.cs (22)
403
SetLastUnit(
_topUndoIndex
== -1 ? null : PeekUndoStack()); // can be null, which is fine
472
if (!(
_topUndoIndex
< UndoStack.Count && PeekUndoStack() == null) // Non-null topmost stack item
486
UndoStack[
_topUndoIndex
] = unit;
672
if (
_topUndoIndex
< 0 ||
_topUndoIndex
== UndoStack.Count)
678
return UndoStack[
_topUndoIndex
] as IUndoUnit;
737
if (_bottomUndoIndex != 0 &&
_topUndoIndex
>= 0)
742
if (_bottomUndoIndex >
_topUndoIndex
)
751
for (i=_bottomUndoIndex; i<=
_topUndoIndex
; i++)
789
if (UndoLimit >= 0 &&
_topUndoIndex
>= UndoLimit)
793
for (int i =
_topUndoIndex
+ 1 - UndoLimit; i <=
_topUndoIndex
; i++)
908
if (UndoStack.Count == 0 ||
_topUndoIndex
< 0)
912
else if (
_topUndoIndex
== _bottomUndoIndex - 1 && PeekUndoStack() == null)
916
else if (
_topUndoIndex
>= _bottomUndoIndex)
918
count =
_topUndoIndex
- _bottomUndoIndex + 1;
922
count =
_topUndoIndex
+ (UndoLimit - _bottomUndoIndex) + 1;
989
for (i = index + count; i <=
_topUndoIndex
; i++)
995
for (i =
_topUndoIndex
- (count - 1); i <=
_topUndoIndex
; i++)
1166
IUndoUnit unit = (IUndoUnit)UndoStack[
_topUndoIndex
];
1168
if (
_topUndoIndex
< 0 && undoCount > 0)