From b90a853ca1f178048ae7ddeb7876d7eb0dff1699 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Thu, 19 Sep 2019 17:44:26 +0200 Subject: [PATCH] Modified InstructionView#highlight --- .../src/net/mograsim/plugin/tables/mi/InstructionView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); }); } -- 2.17.1