Message220536
Progress: As a hack for exploring this issue, I fixed this in the Shell window by having ParenMatch instantiate HyperParser in such a way that it parses the entirety of the current input. In ParenMatch.flash_paren_event(), I added:
from idlelib.PyShell import PyShell
if isinstance(self.editwin, PyShell):
hp = HyperParser(self.editwin, "end-1c")
hp.set_index("insert")
indices = hp.get_surrounding_brackets()
else:
<current behavior>
With this the given example works as expected in the Shell window, i.e. the entire expression is highlighted when the cursor is after the first bracket and pressing ^0.
I still need to find a less hackish way to do this which will also work for editor windows. |
|
| Date |
User |
Action |
Args |
| 2014-06-14 08:35:28 | taleinat | set | recipients:
+ taleinat, terry.reedy, jesstess, Saimadhav.Heblikar |
| 2014-06-14 08:35:28 | taleinat | set | messageid: <[email protected]> |
| 2014-06-14 08:35:28 | taleinat | link | issue21694 messages |
| 2014-06-14 08:35:28 | taleinat | create | |
|