You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When text matching the search query is added or removed, the search results should automatically update.
The search overlay should refresh dynamically, without requiring the user to manually restart the search.
This issue has been resolved by an earlier PR (#3362), which has been merged into the develop branch. It's currently not on https://editor.p5js.org because I haven't pushed the develop to be deployed on production yet. I'm planning to push a release next week, which should reflect these changes. The new releases can be found on the Releases page.
I looked into your attached PR, which specifically reapplies the search on every document change. Although it could help keep results consistently up to date, I don't think we would implement this since re-running the search logic on every keystroke—especially in larger files—can introduce unnecessary performance overhead. Additionally, it may result in a less-than-ideal user experience, such as unexpected updates while editing or replacing text within search matches.
Currently, users have control over when to update the search results (e.g., by retyping or pressing enter), which strikes a good balance between responsiveness and performance. If we see a strong user need for live-updating search in the future, we can definitely revisit this.
p5.js version
No response
What is your operating system?
None
Web browser and version
No response
Actual Behavior
The search results do not update when new text is added.
The search overlay remains stuck on the initial results, even if content changes.
p5.js.Web.Editor.-.Google.Chrome.2025-03-06.17-17-09.mp4
Expected Behavior
When text matching the search query is added or removed, the search results should automatically update.
The search overlay should refresh dynamically, without requiring the user to manually restart the search.
Steps to reproduce
The text was updated successfully, but these errors were encountered: