Message220583
The current behavior is documented, if not exactly 'chosen' as the best possible. "return the indices of the opening bracket and the closing bracket (or the end of line, whichever comes first".
As you note, the automatic matching when pausing afte typing a closer only needs to search back, and that should not be affected. When I type ^0, I am willing to wait the extra 1/20? of a second to get a proper highlight.
To see if anything might depend on the truncated search, I grepped
Searching 'get_surrounding_brackets' in C:\Programs\Python34\Lib\idlelib\*.py ...
CallTips.py: 66: sur_paren = hp.get_surrounding_brackets('(')
HyperParser.py: 105: def get_surrounding_brackets(self, openers='([{', mustclose=False):
ParenMatch.py: 93: indices = HyperParser(self.editwin, "insert").get_surrounding_brackets()
ParenMatch.py: 109: indices = hp.get_surrounding_brackets(_openers[closer], True)
So we have to make sure that calltips are not disabled or burdened. (The 'testing' you said is needed.)
I don't understand the call because the goal is to find the expression preceding '('. There usually is no matching ')' after '(' just typed. I just know that unless unless evalfuncs is True, calltips are not fetched when the function expression contains a function call. 'f(' gives a calltip for f, but 'f()(' does not call f to give a calltip for f(). |
|
Date |
User |
Action |
Args |
2014-06-14 21:41:57 | terry.reedy | set | recipients:
+ terry.reedy, taleinat |
2014-06-14 21:41:57 | terry.reedy | set | messageid: <1402782117.3.0.646026655019.issue21756@psf.upfronthosting.co.za> |
2014-06-14 21:41:57 | terry.reedy | link | issue21756 messages |
2014-06-14 21:41:56 | terry.reedy | create | |
|