Terry J. Reedy <tjre...@udel.edu> added the comment:

Updated summary:
1. Typing a closer highlights closer back to the opener.  No issue.

2. Hitting ^0 on the closer line before the closer highlights from opener to 
closer.  Hitting ^0 on after the opener on the opener line or any following 
line before the closer line highlights from opener to the end of that line.  
This behavior is documented but seems problematical. ^0 is most useful when the 
match spans multiple lines.

3. The 4 occurrences of 'get_surrounding_brackets in master.
hyperparser.py, 116:
    def get_surrounding_brackets(self, openers='([{', mustclose=False)

'tip': calltip.py, 61, in open_calltip
        # Called in all 3 tip function.
        sur_paren = hp.get_surrounding_brackets('(')

'flash' (^0): parenmatch.py, 79, in flash_paren_event
        indices = (HyperParser(self.editwin, "insert")
                   .get_surrounding_brackets())

'close' (closer): parenmatch.py, 92, paren_closed_event
        indices = hp.get_surrounding_brackets(_openers[closer], True)

'tip' and 'flash' both use default mustclose=False.  The truncate behavior for 
tips is that one can move the cursur between opener and closer or eol without 
dismissing box.  I think we agree that 'tip' should remain truncated while 
'flash' need not be.

You solution is to add a new parameter to __init__ only used by 'flash'.  I 
would rather replace 'mustclose' with mode = 'tip', 'flash', or 'close'.  I 
believe that Stopatindex could be revised within the call.

I have not reviewed most of the rest of the patch.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue21756>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to