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
{{ message }}
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.
I am trying to use smart-area to fill in some pre-existing words in a logic equation. This works, but only if the word I am typing in is not in the first location.
At line 371 in smart-area.js I find:
var searchable = text.substr(0, position),
match, found = false, lastPosition = 0;
while ((match = element.trigger.exec(searchable)) !== null){
if(match.index === lastPosition){
break;
}
lastPosition = match.index;
if(match.index + match[0].length === position){
found = true;
break;
}
}
When the trigger matches on the first word, lastPosition is 0, and processing stops. I am trying the initialization lastPosition = -1, and this works, but I don't know if this breaks anything else.
Another thing I noted is that searchable is not changed in the while loop, so the while test result never changes, were you intending something else for this, like finding all matches until arriving at the cursor position?
The text was updated successfully, but these errors were encountered:
I am trying to use smart-area to fill in some pre-existing words in a logic equation. This works, but only if the word I am typing in is not in the first location.
At line 371 in smart-area.js I find:
When the trigger matches on the first word, lastPosition is 0, and processing stops. I am trying the initialization lastPosition = -1, and this works, but I don't know if this breaks anything else.
Another thing I noted is that searchable is not changed in the while loop, so the while test result never changes, were you intending something else for this, like finding all matches until arriving at the cursor position?
The text was updated successfully, but these errors were encountered: