According to the release note of Build 4131:
API: View.expand_to_scope now returns None when the text point doesn’t match the selector
but its not the case I tested below:
A{"bug"};
f("bug");
m["bug"];
a="bug";
paste above code in a new text, set syntax to C++; and at console input:
>>> view.expand_to_scope(view.find('\\{',0).a,'string')
Region(1, 6)
>>> view.expand_to_scope(view.find('\\(',0).a,'string')
Region(11, 16)
>>> view.expand_to_scope(view.find('\\[',0).a,'string')
Region(21, 26)
>>> view.expand_to_scope(view.find('=',0).a,'string')
Region(31, 36)
this is absurd.
This issue is not limited to ‘string’. It seems the implementation have some wrong treats on some punctuations: such as [, ], (, ), =, and comma.