Handle the Replace+Find button as the default command. First performs a replace and then, if the replace was successful, a find next.
(self, event=None)
| 96 | self.do_replace() |
| 97 | |
| 98 | def default_command(self, event=None): |
| 99 | """Handle the Replace+Find button as the default command. |
| 100 | |
| 101 | First performs a replace and then, if the replace was |
| 102 | successful, a find next. |
| 103 | """ |
| 104 | if self.do_find(self.ok): |
| 105 | if self.do_replace(): # Only find next match if replace succeeded. |
| 106 | # A bad re can cause it to fail. |
| 107 | self.do_find(False) |
| 108 | |
| 109 | def _replace_expand(self, m, repl): |
| 110 | "Expand replacement text if regular expression." |
nothing calls this directly
no test coverage detected