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
4d4d2123
Kaydet (Commit)
4d4d2123
authored
Tem 13, 2001
tarafından
Kurt B. Kaiser
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cvs-py-rel2_1 (Rev 1.5) merge - whitespace normalization
üst
6e735c98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
ParenMatch.py
Lib/idlelib/ParenMatch.py
+6
-7
No files found.
Lib/idlelib/ParenMatch.py
Dosyayı görüntüle @
4d4d2123
...
@@ -20,7 +20,7 @@ class ParenMatch:
...
@@ -20,7 +20,7 @@ class ParenMatch:
"""Highlight matching parentheses
"""Highlight matching parentheses
There are three supported style of paren matching, based loosely
There are three supported style of paren matching, based loosely
on the Emacs options. The style is select based on the
on the Emacs options. The style is select based on the
HILITE_STYLE attribute; it can be changed used the set_style
HILITE_STYLE attribute; it can be changed used the set_style
method.
method.
...
@@ -43,9 +43,9 @@ class ParenMatch:
...
@@ -43,9 +43,9 @@ class ParenMatch:
to the right of a right paren. I don't know how to do that in Tk,
to the right of a right paren. I don't know how to do that in Tk,
so I haven't bothered.
so I haven't bothered.
"""
"""
menudefs
=
[]
menudefs
=
[]
keydefs
=
{
keydefs
=
{
'<<flash-open-paren>>'
:
(
'<KeyRelease-parenright>'
,
'<<flash-open-paren>>'
:
(
'<KeyRelease-parenright>'
,
'<KeyRelease-bracketright>'
,
'<KeyRelease-bracketright>'
,
...
@@ -146,7 +146,7 @@ class LastOpenBracketFinder:
...
@@ -146,7 +146,7 @@ class LastOpenBracketFinder:
indentwidth
=
AutoIndent
.
indentwidth
indentwidth
=
AutoIndent
.
indentwidth
tabwidth
=
AutoIndent
.
tabwidth
tabwidth
=
AutoIndent
.
tabwidth
context_use_ps1
=
AutoIndent
.
context_use_ps1
context_use_ps1
=
AutoIndent
.
context_use_ps1
def
__init__
(
self
,
editwin
):
def
__init__
(
self
,
editwin
):
self
.
editwin
=
editwin
self
.
editwin
=
editwin
self
.
text
=
editwin
.
text
self
.
text
=
editwin
.
text
...
@@ -158,7 +158,7 @@ class LastOpenBracketFinder:
...
@@ -158,7 +158,7 @@ class LastOpenBracketFinder:
startatindex
=
`startat`
+
".0"
startatindex
=
`startat`
+
".0"
# rawtext needs to contain everything up to the last
# rawtext needs to contain everything up to the last
# character, which was the close paren. the parser also
# character, which was the close paren. the parser also
# requires that the last line ends with "\n"
# requires that the last line ends with "\n"
rawtext
=
self
.
text
.
get
(
startatindex
,
"insert"
)[:
-
1
]
+
"
\n
"
rawtext
=
self
.
text
.
get
(
startatindex
,
"insert"
)[:
-
1
]
+
"
\n
"
y
.
set_str
(
rawtext
)
y
.
set_str
(
rawtext
)
bod
=
y
.
find_good_parse_start
(
bod
=
y
.
find_good_parse_start
(
...
@@ -175,7 +175,7 @@ class LastOpenBracketFinder:
...
@@ -175,7 +175,7 @@ class LastOpenBracketFinder:
lno
=
index2line
(
self
.
text
.
index
(
"insert"
))
lno
=
index2line
(
self
.
text
.
index
(
"insert"
))
i
,
buf
=
self
.
_find_offset_in_buf
(
lno
)
i
,
buf
=
self
.
_find_offset_in_buf
(
lno
)
if
i
is
None
\
if
i
is
None
\
or
keysym_type
(
buf
[
i
])
!=
right_keysym_type
:
or
keysym_type
(
buf
[
i
])
!=
right_keysym_type
:
return
None
return
None
lines_back
=
string
.
count
(
buf
[
i
:],
"
\n
"
)
-
1
lines_back
=
string
.
count
(
buf
[
i
:],
"
\n
"
)
-
1
# subtract one for the "\n" added to please the parser
# subtract one for the "\n" added to please the parser
...
@@ -189,4 +189,3 @@ class LastOpenBracketFinder:
...
@@ -189,4 +189,3 @@ class LastOpenBracketFinder:
icis
=
self
.
editwin
.
is_char_in_string
):
icis
=
self
.
editwin
.
is_char_in_string
):
return
icis
(
startindex
+
"
%
dc"
%
offset
)
return
icis
(
startindex
+
"
%
dc"
%
offset
)
return
inner
return
inner
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