From 76e36aa9645b69066e4f3fe64a7eb2c303d5be6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sun, 10 Jul 2011 09:31:03 +0200 Subject: [PATCH] AS3: Fixed hilighting instructions with exceptions --- .../asdec/abc/gui/ASMSourceEditorPane.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/trunk/src/com/jpexs/asdec/abc/gui/ASMSourceEditorPane.java b/trunk/src/com/jpexs/asdec/abc/gui/ASMSourceEditorPane.java index 5f2a78f07..56e979685 100644 --- a/trunk/src/com/jpexs/asdec/abc/gui/ASMSourceEditorPane.java +++ b/trunk/src/com/jpexs/asdec/abc/gui/ASMSourceEditorPane.java @@ -103,17 +103,20 @@ public class ASMSourceEditorPane extends JEditorPane { int dot = -2; for (int i = 0; i < text.length(); i++) { if (text.charAt(i) == '\n') { - if (!((i > 0) && (text.charAt(i - 1) == ':'))) - instrCount++; + lineCnt++; - if (instrCount == pos) { - lineStart = i; - dot = lineCnt; + lineEnd=i; + String ins=text.substring(lineStart,lineEnd).trim(); + if (!((i > 0) && (text.charAt(i - 1) == ':'))) + { + if(!ins.startsWith("exception ")){ + instrCount++; + } } - if (lineCnt == dot + 1) { - lineEnd = i; + if (instrCount == pos+1) { break; } + lineStart = i; } } if (lineCnt == -1) {