Skip to content

Exceptions in HistoryHelper #160

@sboulema

Description

@sboulema

Exceptions

[Exception] Error updating CodeDocumentViewModel 
   Index was outside the bounds of the array.
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at System.Linq.Enumerable.SelectIterator[TSource,TResult](IEnumerable`1 source, Func`3 selector)+MoveNext()
   at CodeNav.OutOfProc.Helpers.HistoryHelper.ApplyHistoryIndicator(CodeDocumentViewModel model)
   at CodeNav.OutOfProc.Services.CodeDocumentService.UpdateCodeDocumentViewModel(VisualStudioExtensibility extensibility, ITextViewSnapshot textView, CancellationToken cancellationToken)

https://github.com/sboulema/CodeNav/blob/main/src%2FCodeNav.OutOfProc%2FHelpers%2FHistoryHelper.cs#L94-L97

[Exception] Error adding item to history
   Index was outside the bounds of the array.
   at System.Collections.Generic.List`1.RemoveAll(Predicate`1 match)
   at CodeNav.OutOfProc.Helpers.HistoryHelper.AddItemToHistory(CodeItem item)
   at CodeNav.OutOfProc.Helpers.HistoryHelper.AddItemToHistory(CodeDocumentViewModel codeDocumentViewModel, IEnumerable`1 textEdits)

https://github.com/sboulema/CodeNav/blob/main/src%2FCodeNav.OutOfProc%2FHelpers%2FHistoryHelper.cs#L66-L67

Links

https://stackoverflow.com/questions/14260658/linq-index-out-of-bounds

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions