bpo-37903: IDLE: Shell sidebar with prompts (GH-22682)

The first followup will change shell indents to spaces.
More are expected.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Tal Einat 2021-04-29 01:27:55 +03:00 committed by GitHub
parent 103d5e420d
commit 15d3861856
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 888 additions and 132 deletions

View file

@ -38,6 +38,21 @@ class Percolator:
filter.setdelegate(self.top)
self.top = filter
def insertfilterafter(self, filter, after):
assert isinstance(filter, Delegator)
assert isinstance(after, Delegator)
assert filter.delegate is None
f = self.top
f.resetcache()
while f is not after:
assert f is not self.bottom
f = f.delegate
f.resetcache()
filter.setdelegate(f.delegate)
f.setdelegate(filter)
def removefilter(self, filter):
# XXX Perhaps should only support popfilter()?
assert isinstance(filter, Delegator)