diff --git a/mode_replace.py b/mode_replace.py index a6e0cb3..937eb57 100644 --- a/mode_replace.py +++ b/mode_replace.py @@ -17,7 +17,7 @@ class Replace(mode2.Fundamental): self.add_action_and_bindings(CancelReplace(), ('q', 'RETURN', 'C-]', 'C-n', 'C-p', 'C-a', 'C-e', 'C-f', 'C-b')) m = w.buffer.method - found = _find_next(m, move=False) + found = _find_next(m, False) if not found: w.set_error('%r was not found' % m.before) raise minibuffer.MiniBufferError @@ -29,13 +29,13 @@ class ReplaceOne(method.Method): def execute(self, w, **vargs): m = w.buffer.method _replace(m) - _find_next(m, True) + _find_next(m, False) _finish(m, w) class SkipReplace(method.Method): def execute(self, w, **vargs): m = w.buffer.method - _find_next(m, True) + _find_next(m, False) _finish(m, w) class ReplaceAll(method.Method): @@ -43,7 +43,7 @@ class ReplaceAll(method.Method): m = w.buffer.method while m.p1 is not None: _replace(m) - _find_next(m, True) + _find_next(m, False) _end(w) w.set_error("Replace ended") @@ -62,7 +62,8 @@ def _find_next(m, move=False): (m.p1, m.p2) = (None, None) return False - newc = search.find_next(r, w, move, start=c.add(1, 0)) + #newc = search.find_next(r, w, move, start=c.add(1, 0)) + newc = search.find_next(r, w, move, start=c.add(0, 0)) if newc: (m.p1, m.p2) = newc return True