Search for selected text with previous dialog preferences. Instead of using the same pattern for searching (as Find Again does), this first resets the pattern to the currently selected text. If the selected text isn't changed, then use the prior search phrase.
(self, text)
| 119 | return False |
| 120 | |
| 121 | def find_selection(self, text): |
| 122 | """Search for selected text with previous dialog preferences. |
| 123 | |
| 124 | Instead of using the same pattern for searching (as Find |
| 125 | Again does), this first resets the pattern to the currently |
| 126 | selected text. If the selected text isn't changed, then use |
| 127 | the prior search phrase. |
| 128 | """ |
| 129 | pat = text.get("sel.first", "sel.last") |
| 130 | if pat: |
| 131 | self.engine.setcookedpat(pat) |
| 132 | return self.find_again(text) |
| 133 | |
| 134 | |
| 135 | def _search_dialog(parent): # htest # |