From 3073cf643c4fe249547bb2a7ff22e89f0827c9ae Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Thu, 19 Sep 2019 21:39:33 +0200 Subject: [PATCH] Fixed a very stupid bug in InstructionView#highlight --- .../src/net/mograsim/plugin/tables/mi/InstructionView.java | 2 +- 1 file changed, 1 insertion(+), 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 11e8f3ae..3777ae10 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,7 @@ public class InstructionView extends EditorPart implements MemoryCellModifiedLis viewer.highlightRow(highlighted, false); highlighted = index; viewer.highlightRow(index, true); - viewer.getTable().showItem(viewer.getTable().getItem(Math.min((int) memory.getDefinition().getMaximalAddress(), index - 4))); + viewer.getTable().showItem(viewer.getTable().getItem(Math.min((int) memory.getDefinition().getMaximalAddress(), index + 2))); viewer.getTable().showItem(viewer.getTable().getItem(index)); }); } -- 2.17.1