Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d1ec940f
Commit
d1ec940f
authored
Sep 18, 2002
by
Kurt B. Kaiser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge PyIdle changes:
Rev 1.3 doerwalter (string methods)
parent
06a0987f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Lib/idlelib/SearchEngine.py
Lib/idlelib/SearchEngine.py
+2
-3
No files found.
Lib/idlelib/SearchEngine.py
View file @
d1ec940f
import
string
import
re
from
Tkinter
import
*
import
tkMessageBox
...
...
@@ -175,7 +174,7 @@ class SearchEngine:
wrapped
=
1
wrap
=
0
pos
=
text
.
index
(
"end-1c"
)
line
,
col
=
map
(
int
,
string
.
split
(
pos
,
"."
))
line
,
col
=
map
(
int
,
pos
.
split
(
"."
))
chars
=
text
.
get
(
"%d.0"
%
line
,
"%d.0"
%
(
line
+
1
))
col
=
len
(
chars
)
-
1
return
None
...
...
@@ -217,5 +216,5 @@ def get_selection(text):
# Helper to parse a text index into a (line, col) tuple.
def
get_line_col
(
index
):
line
,
col
=
map
(
int
,
string
.
split
(
index
,
"."
))
# Fails on invalid index
line
,
col
=
map
(
int
,
index
.
split
(
"."
))
# Fails on invalid index
return
line
,
col
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