From: Daniel Kirschten Date: Thu, 19 Sep 2019 15:44:26 +0000 (+0200) Subject: Modified InstructionView#highlight X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=b90a853ca1f178048ae7ddeb7876d7eb0dff1699;hp=87a019ac84327e94401b6f0df9bb94da08287679;p=Mograsim.git Modified InstructionView#highlight --- 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 b21c848d..11e8f3ae 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 @@ -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 - 4))); + viewer.getTable().showItem(viewer.getTable().getItem(index)); }); }