diff --git a/CHANGELOG.md b/CHANGELOG.md index e8937390a..1f694d0bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. - SWF is not garbage collected on close in some situations - AS1/2 script search does not show all results - #1633 AS3 decompilation - return in for..in clause +- AS3 p-code/AS hilighting when outside trait ### Removed - #1631 ActiveX Flash component download in windows installer diff --git a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index 2a7c54827..36f04de35 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -176,19 +176,14 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL if (currentMethodHighlight == null) { return; } - for (Highlighting h : highlightedText.getTraitHighlights()) { - if (h.getProperties().index == lastTraitIndex) { - Highlighting h2 = Highlighting.searchOffset(highlightedText.getInstructionHighlights(), offset, h.startPos, h.startPos + h.len); - if (h2 != null) { - ignoreCarret = true; - if (h2.startPos <= getDocument().getLength()) { - setCaretPosition(h2.startPos); - } - getCaret().setVisible(true); - ignoreCarret = false; - } - + Highlighting h2 = Highlighting.searchOffset(highlightedText.getInstructionHighlights(), offset, currentMethodHighlight.startPos, currentMethodHighlight.startPos + currentMethodHighlight.len); + if (h2 != null) { + ignoreCarret = true; + if (h2.startPos <= getDocument().getLength()) { + setCaretPosition(h2.startPos); } + getCaret().setVisible(true); + ignoreCarret = false; } }