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
5a231c8f
Commit
5a231c8f
authored
Nov 06, 2002
by
Chui Tey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
By default when getting the search menu, the currently highligted
text is the search term.
parent
110aa50c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Lib/idlelib/SearchDialog.py
Lib/idlelib/SearchDialog.py
+2
-1
Lib/idlelib/SearchDialogBase.py
Lib/idlelib/SearchDialogBase.py
+4
-1
No files found.
Lib/idlelib/SearchDialog.py
View file @
5a231c8f
...
...
@@ -11,7 +11,8 @@ def _setup(text):
return
engine
.
_searchdialog
def
find
(
text
):
return
_setup
(
text
).
open
(
text
)
pat
=
text
.
get
(
"sel.first"
,
"sel.last"
)
return
_setup
(
text
).
open
(
text
,
pat
)
def
find_again
(
text
):
return
_setup
(
text
).
find_again
(
text
)
...
...
Lib/idlelib/SearchDialogBase.py
View file @
5a231c8f
...
...
@@ -11,13 +11,16 @@ class SearchDialogBase:
self
.
engine
=
engine
self
.
top
=
None
def
open
(
self
,
text
):
def
open
(
self
,
text
,
searchphrase
=
None
):
self
.
text
=
text
if
not
self
.
top
:
self
.
create_widgets
()
else
:
self
.
top
.
deiconify
()
self
.
top
.
tkraise
()
if
searchphrase
:
self
.
ent
.
delete
(
0
,
"end"
)
self
.
ent
.
insert
(
"end"
,
searchphrase
)
self
.
ent
.
focus_set
()
self
.
ent
.
selection_range
(
0
,
"end"
)
self
.
ent
.
icursor
(
0
)
...
...
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