diff --git a/Debugger/ILSpy.Debugger/Services/Debugger/DebuggerService.cs b/Debugger/ILSpy.Debugger/Services/Debugger/DebuggerService.cs index 96c59f889..bd1adbbfd 100644 --- a/Debugger/ILSpy.Debugger/Services/Debugger/DebuggerService.cs +++ b/Debugger/ILSpy.Debugger/Services/Debugger/DebuggerService.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using ICSharpCode.AvalonEdit.Document; using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.ILAst; +using ICSharpCode.ILSpy; using ICSharpCode.ILSpy.Bookmarks; using ICSharpCode.ILSpy.Debugger.Bookmarks; using ICSharpCode.ILSpy.Debugger.Tooltips; @@ -189,6 +190,7 @@ namespace ICSharpCode.ILSpy.Debugger.Services public static void JumpToCurrentLine(MemberReference memberReference, int startLine, int startColumn, int endLine, int endColumn) { CurrentLineBookmark.SetPosition(memberReference, startLine, startColumn, endLine, endColumn); + MainWindow.Instance.TextView.UnfoldAndScroll(startLine); } #region Tool tips diff --git a/ILSpy.SharpDevelop.LGPL/Bookmarks/CurrentLineBookmark.cs b/ILSpy.SharpDevelop.LGPL/Bookmarks/CurrentLineBookmark.cs index f7772a642..2fd25a6b7 100644 --- a/ILSpy.SharpDevelop.LGPL/Bookmarks/CurrentLineBookmark.cs +++ b/ILSpy.SharpDevelop.LGPL/Bookmarks/CurrentLineBookmark.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.ILSpy.Debugger.Bookmarks get { return 100; } } - public CurrentLineBookmark(MemberReference member, AstLocation location) : base(member, location) + private CurrentLineBookmark(MemberReference member, AstLocation location) : base(member, location) { } diff --git a/ILSpy/TextView/DecompilerTextView.cs b/ILSpy/TextView/DecompilerTextView.cs index 0c16ac2ea..ca8598c81 100644 --- a/ILSpy/TextView/DecompilerTextView.cs +++ b/ILSpy/TextView/DecompilerTextView.cs @@ -462,7 +462,6 @@ namespace ICSharpCode.ILSpy.TextView DebugInformation.CodeMappings[token].GetInstructionByTokenAndOffset(token, ilOffset, out member, out line); // update marker - CurrentLineBookmark.Remove(); CurrentLineBookmark.SetPosition(member, line, 0, line, 0); var bm = CurrentLineBookmark.Instance;