Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8666dbc

Browse files
Bug fix. add check To prevent off by one errorsThese are the boundaries of functions
While normally, if on an empty line origin is going to bound to the line below, On the boundaries between functions It will bound upwards by design. Unfortunately, These caused An issue because to prevent all my one errors When going upwards When the statements spread over multiple lines, there were checks if we were below its beginning but not thief we were above its ending( because otherwise Origin would normally bound to the linee below!). These commit Add those checks and resolve #28
1 parent 64109fc commit 8666dbc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎queries/big_roi.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ def case_three(self,view_information,query_description, extra = {}):
226226
test_result = decode_abstract_vertical(root,atok,targets,row+1, 1,direction,True,
227227
temporary_information,want_alternatives = False)
228228
l = search_upwards_log(origin,ast.stmt)
229-
if test_result in [l[0]] + l[1] and row + 1>=test_result.first_token.start[0]:
229+
if (test_result in [l[0]] + l[1] and
230+
row + 1>=test_result.first_token.start[0] and
231+
row + 1<=test_result.last_token.end[0]
232+
):
233+
230234
ndir = ndir + 1
231235

232236

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /