This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients taleinat, terry.reedy
Date 2020-06-09.06:21:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1591683664.53.0.144617519462.issue21756@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-06-09 06:21:04terry.reedysetrecipients: + terry.reedy, taleinat
2020-06-09 06:21:04terry.reedysetmessageid: <1591683664.53.0.144617519462.issue21756@roundup.psfhosted.org>
2020-06-09 06:21:04terry.reedylinkissue21756 messages
2020-06-09 06:21:04terry.reedycreate