Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
9c5c0af8
Kaydet (Commit)
9c5c0af8
authored
Nis 27, 2008
tarafından
Kurt B. Kaiser
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Improved AutoCompleteWindow logic. Patch 2062 Tal Einat.
üst
93cdae5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
AutoCompleteWindow.py
Lib/idlelib/AutoCompleteWindow.py
+12
-7
NEWS.txt
Lib/idlelib/NEWS.txt
+2
-0
No files found.
Lib/idlelib/AutoCompleteWindow.py
Dosyayı görüntüle @
9c5c0af8
...
@@ -54,9 +54,9 @@ class AutoCompleteWindow:
...
@@ -54,9 +54,9 @@ class AutoCompleteWindow:
self
.
lastkey_was_tab
=
False
self
.
lastkey_was_tab
=
False
def
_change_start
(
self
,
newstart
):
def
_change_start
(
self
,
newstart
):
min_len
=
min
(
len
(
self
.
start
),
len
(
newstart
))
i
=
0
i
=
0
while
i
<
len
(
self
.
start
)
and
i
<
len
(
newstart
)
and
\
while
i
<
min_len
and
self
.
start
[
i
]
==
newstart
[
i
]:
self
.
start
[
i
]
==
newstart
[
i
]:
i
+=
1
i
+=
1
if
i
<
len
(
self
.
start
):
if
i
<
len
(
self
.
start
):
self
.
widget
.
delete
(
"
%
s+
%
dc"
%
(
self
.
startindex
,
i
),
self
.
widget
.
delete
(
"
%
s+
%
dc"
%
(
self
.
startindex
,
i
),
...
@@ -98,13 +98,17 @@ class AutoCompleteWindow:
...
@@ -98,13 +98,17 @@ class AutoCompleteWindow:
i
=
m
+
1
i
=
m
+
1
last
=
i
-
1
last
=
i
-
1
if
first
==
last
:
# only one possible completion
return
self
.
completions
[
first
]
# We should return the maximum prefix of first and last
# We should return the maximum prefix of first and last
first_comp
=
self
.
completions
[
first
]
last_comp
=
self
.
completions
[
last
]
min_len
=
min
(
len
(
first_comp
),
len
(
last_comp
))
i
=
len
(
s
)
i
=
len
(
s
)
while
len
(
self
.
completions
[
first
])
>
i
and
\
while
i
<
min_len
and
first_comp
[
i
]
==
last_comp
[
i
]:
len
(
self
.
completions
[
last
])
>
i
and
\
self
.
completions
[
first
][
i
]
==
self
.
completions
[
last
][
i
]:
i
+=
1
i
+=
1
return
self
.
completions
[
first
]
[:
i
]
return
first_comp
[:
i
]
def
_selection_changed
(
self
):
def
_selection_changed
(
self
):
"""Should be called when the selection of the Listbox has changed.
"""Should be called when the selection of the Listbox has changed.
...
@@ -118,8 +122,9 @@ class AutoCompleteWindow:
...
@@ -118,8 +122,9 @@ class AutoCompleteWindow:
if
self
.
_binary_search
(
lts
)
==
cursel
:
if
self
.
_binary_search
(
lts
)
==
cursel
:
newstart
=
lts
newstart
=
lts
else
:
else
:
min_len
=
min
(
len
(
lts
),
len
(
selstart
))
i
=
0
i
=
0
while
i
<
len
(
lts
)
and
i
<
len
(
selstart
)
and
lts
[
i
]
==
selstart
[
i
]:
while
i
<
min_len
and
lts
[
i
]
==
selstart
[
i
]:
i
+=
1
i
+=
1
newstart
=
selstart
[:
i
]
newstart
=
selstart
[:
i
]
self
.
_change_start
(
newstart
)
self
.
_change_start
(
newstart
)
...
...
Lib/idlelib/NEWS.txt
Dosyayı görüntüle @
9c5c0af8
...
@@ -9,6 +9,8 @@ What's New in IDLE 2.6a3?
...
@@ -9,6 +9,8 @@ What's New in IDLE 2.6a3?
- Home / Control-A toggles between left margin and end of leading white
- Home / Control-A toggles between left margin and end of leading white
space. Patch 1196903 Jeff Shute.
space. Patch 1196903 Jeff Shute.
- Improved AutoCompleteWindow logic. Patch 2062 Tal Einat.
What's New in IDLE 2.6a1?
What's New in IDLE 2.6a1?
=========================
=========================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment