diff --git a/app/src/processing/app/EditorTab.java b/app/src/processing/app/EditorTab.java index 416a99836a5..5e8f3e4bfcf 100644 --- a/app/src/processing/app/EditorTab.java +++ b/app/src/processing/app/EditorTab.java @@ -442,6 +442,9 @@ public void setText(String what) { } finally { caret.setUpdatePolicy(policy); } + // A trick to force textarea to recalculate the bracket matching rectangle. + // In the worst case scenario, this should be ineffective. + textarea.setLineWrap(textarea.getLineWrap()); } /**