9 writes to _topUndoIndex
PresentationFramework (9)
MS\Internal\Documents\UndoManager.cs (9)
79
_topUndoIndex
= -1;
439
if (++
_topUndoIndex
== UndoLimit)
441
_topUndoIndex
= 0;
725
_topUndoIndex
= undoStack.Count - 1;
767
_topUndoIndex
= UndoLimit - 1;
968
_topUndoIndex
-= count;
1126
_topUndoIndex
= -1;
1134
UndoStack[
_topUndoIndex
--] = null;
1138
_topUndoIndex
= UndoLimit - 1; // This should never be possible with an unlimited stack
22 references to _topUndoIndex
PresentationFramework (22)
MS\Internal\Documents\UndoManager.cs (22)
377
SetLastUnit(
_topUndoIndex
== -1 ? null : PeekUndoStack()); // can be null, which is fine
443
if (!(
_topUndoIndex
< UndoStack.Count && PeekUndoStack() == null) // Non-null topmost stack item
457
UndoStack[
_topUndoIndex
] = unit;
639
if (
_topUndoIndex
< 0 ||
_topUndoIndex
== UndoStack.Count)
645
return UndoStack[
_topUndoIndex
] as IUndoUnit;
704
if (_bottomUndoIndex != 0 &&
_topUndoIndex
>= 0)
709
if (_bottomUndoIndex >
_topUndoIndex
)
718
for (i = _bottomUndoIndex; i <=
_topUndoIndex
; i++)
756
if (UndoLimit >= 0 &&
_topUndoIndex
>= UndoLimit)
760
for (int i =
_topUndoIndex
+ 1 - UndoLimit; i <=
_topUndoIndex
; i++)
875
if (UndoStack.Count == 0 ||
_topUndoIndex
< 0)
879
else if (
_topUndoIndex
== _bottomUndoIndex - 1 && PeekUndoStack() == null)
883
else if (
_topUndoIndex
>= _bottomUndoIndex)
885
count =
_topUndoIndex
- _bottomUndoIndex + 1;
889
count =
_topUndoIndex
+ (UndoLimit - _bottomUndoIndex) + 1;
956
for (i = index + count; i <=
_topUndoIndex
; i++)
962
for (i =
_topUndoIndex
- (count - 1); i <=
_topUndoIndex
; i++)
1133
IUndoUnit unit = (IUndoUnit)UndoStack[
_topUndoIndex
];
1135
if (
_topUndoIndex
< 0 && undoCount > 0)