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
I believe this approach will break down if cursor is between adjacent scopes. Let's say scopes look like the following (document text is `0123`):
0123
a: -
b: -
c: --
d: ---
And cursor is between 2 and 3 and scope preference breaks left, so containing scope is a. If you say "grand grand scope", you will get b, when you should get d. I think you need to keep a currentScope, initialize it to the original containing scope, filter out scopes that are not a parent of the current scope, and keep updating it and increment ancestor count each time you find a matching scope. Not sure if that makes sense?
And cursor is between
2
and3
and scope preference breaks left, so containing scope isa
. If you say"grand grand scope"
, you will getb
, when you should getd
. I think you need to keep acurrentScope
, initialize it to the original containing scope, filter out scopes that are not a parent of the current scope, and keep updating it and increment ancestor count each time you find a matching scope. Not sure if that makes sense?Originally posted by @pokey in #2130 (comment)
The text was updated successfully, but these errors were encountered: