diff options
author | Chui Tey <chui.tey@advdata.com.au> | 2002-11-06 02:18:45 (GMT) |
---|---|---|
committer | Chui Tey <chui.tey@advdata.com.au> | 2002-11-06 02:18:45 (GMT) |
commit | 5a231c8f790b1d48daa83fc14b54c056d1330d45 (patch) | |
tree | 49116bd80f1acd09dfdbafc005848ccd1f1ece75 /Lib/idlelib/SearchDialog.py | |
parent | 110aa50cc244cd4c32ab90aeed6e2ad6515365b5 (diff) | |
download | cpython-5a231c8f790b1d48daa83fc14b54c056d1330d45.zip cpython-5a231c8f790b1d48daa83fc14b54c056d1330d45.tar.gz cpython-5a231c8f790b1d48daa83fc14b54c056d1330d45.tar.bz2 |
By default when getting the search menu, the currently highligted
text is the search term.
Diffstat (limited to 'Lib/idlelib/SearchDialog.py')
-rw-r--r-- | Lib/idlelib/SearchDialog.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/SearchDialog.py b/Lib/idlelib/SearchDialog.py index 8d275c4..d7124d6 100644 --- a/Lib/idlelib/SearchDialog.py +++ b/Lib/idlelib/SearchDialog.py @@ -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) |