mirror of
https://github.com/python/cpython.git
synced 2025-08-20 16:53:19 +00:00
1. Avoid hang when encountering a duplicate in a completion list. Bug 1571112.
2. Duplicate some old entries from Python's NEWS to IDLE's NEWS.txt Backport of r53042
This commit is contained in:
parent
6493ade54d
commit
1df323a196
2 changed files with 17 additions and 2 deletions
|
@ -118,8 +118,11 @@ class AutoCompleteWindow:
|
|||
i = 0
|
||||
while i < len(lts) and i < len(selstart) and lts[i] == selstart[i]:
|
||||
i += 1
|
||||
while cursel > 0 and selstart[:i] <= self.completions[cursel-1]:
|
||||
previous_completion = self.completions[cursel - 1]
|
||||
while cursel > 0 and selstart[:i] <= previous_completion:
|
||||
i += 1
|
||||
if selstart == previous_completion:
|
||||
break # maybe we have a duplicate?
|
||||
newstart = selstart[:i]
|
||||
self._change_start(newstart)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue