From 7d64b694e4d70335e957f80c3b46c5b1c3a9c30a Mon Sep 17 00:00:00 2001 From: Fabian Stemmler Date: Sat, 12 Oct 2019 13:16:30 +0200 Subject: [PATCH] Fixed an IndexOutOfBoundsException --- .../src/net/mograsim/plugin/tables/mi/RowHighlighter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/RowHighlighter.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/RowHighlighter.java index e7435a20..3b1aa038 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/RowHighlighter.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/RowHighlighter.java @@ -35,7 +35,7 @@ public class RowHighlighter cProv.highlight(row); if (row != -1) { - table.showItem(table.getItem(Math.min(table.getItemCount(), row + 2))); + table.showItem(table.getItem(Math.min(table.getItemCount() - 1, row + 2))); table.showItem(table.getItem(row)); Optional.ofNullable(table.getItem(row).getData()).ifPresent(d -> viewer.update(d, null)); } -- 2.17.1