9 writes to _topUndoIndex
PresentationFramework (9)
MS\Internal\Documents\UndoManager.cs (9)
70
_topUndoIndex
= -1;
430
if (++
_topUndoIndex
== UndoLimit)
432
_topUndoIndex
= 0;
716
_topUndoIndex
= undoStack.Count - 1;
758
_topUndoIndex
= UndoLimit - 1;
959
_topUndoIndex
-= count;
1117
_topUndoIndex
= -1;
1125
UndoStack[
_topUndoIndex
--] = null;
1129
_topUndoIndex
= UndoLimit - 1; // This should never be possible with an unlimited stack
22 references to _topUndoIndex
PresentationFramework (22)
MS\Internal\Documents\UndoManager.cs (22)
368
SetLastUnit(
_topUndoIndex
== -1 ? null : PeekUndoStack()); // can be null, which is fine
434
if (!(
_topUndoIndex
< UndoStack.Count && PeekUndoStack() == null) // Non-null topmost stack item
448
UndoStack[
_topUndoIndex
] = unit;
630
if (
_topUndoIndex
< 0 ||
_topUndoIndex
== UndoStack.Count)
636
return UndoStack[
_topUndoIndex
] as IUndoUnit;
695
if (_bottomUndoIndex != 0 &&
_topUndoIndex
>= 0)
700
if (_bottomUndoIndex >
_topUndoIndex
)
709
for (i = _bottomUndoIndex; i <=
_topUndoIndex
; i++)
747
if (UndoLimit >= 0 &&
_topUndoIndex
>= UndoLimit)
751
for (int i =
_topUndoIndex
+ 1 - UndoLimit; i <=
_topUndoIndex
; i++)
866
if (UndoStack.Count == 0 ||
_topUndoIndex
< 0)
870
else if (
_topUndoIndex
== _bottomUndoIndex - 1 && PeekUndoStack() == null)
874
else if (
_topUndoIndex
>= _bottomUndoIndex)
876
count =
_topUndoIndex
- _bottomUndoIndex + 1;
880
count =
_topUndoIndex
+ (UndoLimit - _bottomUndoIndex) + 1;
947
for (i = index + count; i <=
_topUndoIndex
; i++)
953
for (i =
_topUndoIndex
- (count - 1); i <=
_topUndoIndex
; i++)
1124
IUndoUnit unit = (IUndoUnit)UndoStack[
_topUndoIndex
];
1126
if (
_topUndoIndex
< 0 && undoCount > 0)