projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d58bcd
)
When find_again() finds exactly the current selection, it's a failure.
author
Guido van Rossum
<guido@python.org>
Thu, 28 Jan 1999 19:04:01 +0000
(19:04 +0000)
committer
Guido van Rossum
<guido@python.org>
Thu, 28 Jan 1999 19:04:01 +0000
(19:04 +0000)
Tools/idle/SearchDialog.py
patch
|
blob
|
history
diff --git
a/Tools/idle/SearchDialog.py
b/Tools/idle/SearchDialog.py
index 501b6d0067a37cd49fa180b8cbcf8760ad4fcd30..0f0cb189f6b7ed5db5c4d3c08d7954b6dcf275e2 100644
(file)
--- a/
Tools/idle/SearchDialog.py
+++ b/
Tools/idle/SearchDialog.py
@@
-43,6
+43,14
@@
class SearchDialog(SearchDialogBase):
i, j = m.span()
first = "%d.%d" % (line, i)
last = "%d.%d" % (line, j)
+ try:
+ selfirst = text.index("sel.first")
+ sellast = text.index("sel.last")
+ if selfirst == first and sellast == last:
+ text.bell()
+ return 0
+ except TclError:
+ pass
text.tag_remove("sel", "1.0", "end")
text.tag_add("sel", first, last)
text.mark_set("insert", self.engine.isback() and first or last)