diff --git a/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml b/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml
index ef8ce30db..9aa9b53ad 100644
--- a/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml
+++ b/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml
@@ -30,7 +30,7 @@
-->
-
+
diff --git a/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml.cs b/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml.cs
index 20e1db09d..2008377b5 100644
--- a/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml.cs
+++ b/source2/VSIP/Cosmos.VS.Windows/AssemblyUC.xaml.cs
@@ -129,6 +129,7 @@ namespace Cosmos.VS.Windows
List xLabelPrefixes = new List();
bool foundMETHOD_Prefix = false;
bool foundMethodName = false;
+ int mCurrentLineNumber = 0;
foreach (var xLine in mLines)
{
string xDisplayLine = xLine.ToString();
@@ -186,6 +187,11 @@ namespace Cosmos.VS.Windows
if (tblkSource.Inlines.Count > 0)
{
tblkSource.Inlines.Add(new LineBreak());
+ if (!foundCurrentLine)
+ {
+ mCurrentLineNumber++;
+ }
+
mCode.AppendLine();
}
}
@@ -257,11 +263,19 @@ namespace Cosmos.VS.Windows
xRun.Foreground = Brushes.HotPink;
}
+ if (!foundCurrentLine)
+ {
+ mCurrentLineNumber++;
+ }
tblkSource.Inlines.Add(xRun);
tblkSource.Inlines.Add(new LineBreak());
mCode.AppendLine(xDisplayLine);
}
+ //EdMan196: This line of code was worked out by trial and error.
+ //If you change it proper testing/thinking, you will have to add RIP to your name.
+ double offset = mCurrentLineNumber * ((tblkSource.FontSize * tblkSource.FontFamily.LineSpacing) - 2.1);
+ ASMScrollViewer.ScrollToVerticalOffset(offset);
}
protected void OnASMCodeTextMouseUp(object aSender, System.Windows.Input.MouseButtonEventArgs aArgs)