9 writes to _topUndoIndex
PresentationFramework (9)
MS\Internal\Documents\UndoManager.cs (9)
69
_topUndoIndex
= -1;
429
if (++
_topUndoIndex
== UndoLimit)
431
_topUndoIndex
= 0;
715
_topUndoIndex
= undoStack.Count - 1;
757
_topUndoIndex
= UndoLimit - 1;
958
_topUndoIndex
-= count;
1116
_topUndoIndex
= -1;
1124
UndoStack[
_topUndoIndex
--] = null;
1128
_topUndoIndex
= UndoLimit - 1; // This should never be possible with an unlimited stack
22 references to _topUndoIndex
PresentationFramework (22)
MS\Internal\Documents\UndoManager.cs (22)
367
SetLastUnit(
_topUndoIndex
== -1 ? null : PeekUndoStack()); // can be null, which is fine
433
if (!(
_topUndoIndex
< UndoStack.Count && PeekUndoStack() == null) // Non-null topmost stack item
447
UndoStack[
_topUndoIndex
] = unit;
629
if (
_topUndoIndex
< 0 ||
_topUndoIndex
== UndoStack.Count)
635
return UndoStack[
_topUndoIndex
] as IUndoUnit;
694
if (_bottomUndoIndex != 0 &&
_topUndoIndex
>= 0)
699
if (_bottomUndoIndex >
_topUndoIndex
)
708
for (i = _bottomUndoIndex; i <=
_topUndoIndex
; i++)
746
if (UndoLimit >= 0 &&
_topUndoIndex
>= UndoLimit)
750
for (int i =
_topUndoIndex
+ 1 - UndoLimit; i <=
_topUndoIndex
; i++)
865
if (UndoStack.Count == 0 ||
_topUndoIndex
< 0)
869
else if (
_topUndoIndex
== _bottomUndoIndex - 1 && PeekUndoStack() == null)
873
else if (
_topUndoIndex
>= _bottomUndoIndex)
875
count =
_topUndoIndex
- _bottomUndoIndex + 1;
879
count =
_topUndoIndex
+ (UndoLimit - _bottomUndoIndex) + 1;
946
for (i = index + count; i <=
_topUndoIndex
; i++)
952
for (i =
_topUndoIndex
- (count - 1); i <=
_topUndoIndex
; i++)
1123
IUndoUnit unit = (IUndoUnit)UndoStack[
_topUndoIndex
];
1125
if (
_topUndoIndex
< 0 && undoCount > 0)