X-Git-Url: https://mograsim.net/gitweb/?p=Mograsim.git;a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmi%2FInstructionView.java;h=37aab63806eef68a5e2bc10aab4a075846df291f;hp=b50dc84fab0e20256dced9190349220b4852e28c;hb=363c9377b3c542c87fc5e7f57674751439246dbd;hpb=38902818500a67f6a55973b9acbd4194f7a82838 diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java index b50dc84f..37aab638 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java @@ -66,7 +66,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)); }); }