Skip to content

Commit d78e828

Browse files
committed
make Find in Reference default to built-in PApplet methods (fixes #4224)
1 parent 3226fa6 commit d78e828

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/src/processing/app/Mode.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,13 @@ protected void loadKeywords(File keywordFile,
166166
if (htmlFilename.endsWith("_")) {
167167
keyword += "_";
168168
}
169-
keywordToReference.put(keyword, htmlFilename);
169+
// Allow the bare size() command to override the lookup
170+
// for StringList.size() and others, but not vice-versa.
171+
// https://github.com/processing/processing/issues/4224
172+
boolean seen = keywordToReference.containsKey(keyword);
173+
if (!seen || (seen && keyword.equals(htmlFilename))) {
174+
keywordToReference.put(keyword, htmlFilename);
175+
}
170176
}
171177
}
172178
}

todo.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
0254 (3.2.2 or 3.3)
2+
X Find in reference for size() opens StringList.size()
3+
X https://github.com/processing/processing/issues/4224
4+
X though that's still imperfect:
5+
X https://github.com/processing/processing/issues/4655
26
X more font tweaks to make mono fonts work properly after #4639
37
_ update the Linux notes based on where we land on this
48
_ https://github.com/processing/processing/wiki/Supported-Platforms#linux

0 commit comments

Comments
 (0)