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
cd3d8bee
Kaydet (Commit)
cd3d8bee
authored
Agu 10, 2006
tarafından
Kurt B. Kaiser
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Retrieval of previous shell command was not always preserving indentation
since 1.2a1) Patch 1528468 Tal Einat.
üst
b2dd1a39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
NEWS.txt
Lib/idlelib/NEWS.txt
+3
-0
PyShell.py
Lib/idlelib/PyShell.py
+15
-9
No files found.
Lib/idlelib/NEWS.txt
Dosyayı görüntüle @
cd3d8bee
...
...
@@ -3,6 +3,9 @@ What's New in IDLE 1.2c1?
*Release date: XX-AUG-2006*
- Retrieval of previous shell command was not always preserving indentation
(since 1.2a1) Patch 1528468 Tal Einat.
- Changing tokenize (39046) to detect dedent broke tabnanny check (since 1.2a1)
- ToggleTab dialog was setting indent to 8 even if cancelled (since 1.2a1).
...
...
Lib/idlelib/PyShell.py
Dosyayı görüntüle @
cd3d8bee
...
...
@@ -593,7 +593,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
source
=
source
.
encode
(
IOBinding
.
encoding
)
except
UnicodeError
:
self
.
tkconsole
.
resetoutput
()
self
.
write
(
"Unsupported characters in input"
)
self
.
write
(
"Unsupported characters in input
\n
"
)
return
try
:
# InteractiveInterpreter.runsource() calls its runcode() method,
...
...
@@ -1138,21 +1138,27 @@ class PyShell(OutputWindow):
return
"break"
def
recall
(
self
,
s
,
event
):
# remove leading and trailing empty or whitespace lines
s
=
re
.
sub
(
r'^\s*\n'
,
''
,
s
)
s
=
re
.
sub
(
r'\n\s*$'
,
''
,
s
)
lines
=
s
.
split
(
'
\n
'
)
self
.
text
.
undo_block_start
()
try
:
self
.
text
.
tag_remove
(
"sel"
,
"1.0"
,
"end"
)
self
.
text
.
mark_set
(
"insert"
,
"end-1c"
)
s
=
s
.
strip
()
lines
=
s
.
split
(
'
\n
'
)
prefix
=
self
.
text
.
get
(
"insert linestart"
,
"insert"
)
.
rstrip
()
if
prefix
and
prefix
[
-
1
]
==
':'
:
prefix
=
self
.
text
.
get
(
"insert linestart"
,
"insert"
)
if
prefix
.
rstrip
()
.
endswith
(
':'
):
self
.
newline_and_indent_event
(
event
)
self
.
text
.
insert
(
"insert"
,
lines
[
0
]
.
strip
())
prefix
=
self
.
text
.
get
(
"insert linestart"
,
"insert"
)
self
.
text
.
insert
(
"insert"
,
lines
[
0
]
.
strip
())
if
len
(
lines
)
>
1
:
self
.
newline_and_indent_event
(
event
)
orig_base_indent
=
re
.
search
(
r'^([ \t]*)'
,
lines
[
0
])
.
group
(
0
)
new_base_indent
=
re
.
search
(
r'^([ \t]*)'
,
prefix
)
.
group
(
0
)
for
line
in
lines
[
1
:]:
self
.
text
.
insert
(
"insert"
,
line
.
strip
())
self
.
newline_and_indent_event
(
event
)
if
line
.
startswith
(
orig_base_indent
):
# replace orig base indentation with new indentation
line
=
new_base_indent
+
line
[
len
(
orig_base_indent
):]
self
.
text
.
insert
(
'insert'
,
'
\n
'
+
line
.
rstrip
())
finally
:
self
.
text
.
see
(
"insert"
)
self
.
text
.
undo_block_stop
()
...
...
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