mirror of
https://github.com/processing/processing4.git
synced 2026-02-08 16:19:31 +01:00
Fix bracket matching bugs.
This commit is contained in:
@@ -51,7 +51,7 @@ public class Brackets {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (offsets == null || offsets.get(offsets.size()-1) >= text.length())
|
||||
if (offsets == null)
|
||||
parse(text);
|
||||
|
||||
// find this bracket
|
||||
@@ -126,9 +126,9 @@ public class Brackets {
|
||||
for (pos++; pos < len; pos++) {
|
||||
final char c = text.charAt(pos);
|
||||
if (c == '*' && (pos < len - 1)) {
|
||||
pos++;
|
||||
final char d = text.charAt(pos);
|
||||
final char d = text.charAt(pos + 1);
|
||||
if (d == '/') {
|
||||
pos++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -818,6 +818,7 @@ public class JEditTextArea extends JComponent
|
||||
|
||||
document.addDocumentListener(documentHandler);
|
||||
|
||||
bracketHelper.invalidate();
|
||||
select(0, 0);
|
||||
updateScrollBars();
|
||||
painter.repaint();
|
||||
@@ -838,6 +839,7 @@ public class JEditTextArea extends JComponent
|
||||
|
||||
document.addDocumentListener(documentHandler);
|
||||
|
||||
bracketHelper.invalidate();
|
||||
select(start, stop);
|
||||
updateScrollBars();
|
||||
setVerticalScrollPosition(scroll);
|
||||
|
||||
Reference in New Issue
Block a user