Fixed a very stupid bug in InstructionView#highlight
[Mograsim.git] / plugins / net.mograsim.plugin.core / src / net / mograsim / plugin / tables / mi / InstructionView.java
index b21c848..3777ae1 100644 (file)
@@ -68,7 +68,8 @@ public class InstructionView extends EditorPart implements MemoryCellModifiedLis
                        viewer.highlightRow(highlighted, false);
                        highlighted = index;
                        viewer.highlightRow(index, true);
-                       viewer.getTable().setTopIndex(index);
+                       viewer.getTable().showItem(viewer.getTable().getItem(Math.min((int) memory.getDefinition().getMaximalAddress(), index + 2)));
+                       viewer.getTable().showItem(viewer.getTable().getItem(index));
                });
        }