From 6afec24fe05b5d595644fe752f257ea7dca3b273 Mon Sep 17 00:00:00 2001 From: moculus Date: Thu, 19 Jul 2007 04:57:43 +0000 Subject: [PATCH] maybe fixed a replace bug --HG-- branch : pmacs2 --- mode_replace.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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