parent
91f06f6e0a
commit
d056a9b61b
|
@ -35,7 +35,7 @@ class ReplaceOne(method.Method):
|
||||||
class SkipReplace(method.Method):
|
class SkipReplace(method.Method):
|
||||||
def execute(self, w, **vargs):
|
def execute(self, w, **vargs):
|
||||||
m = w.buffer.method
|
m = w.buffer.method
|
||||||
_find_next(m, False)
|
_find_next(m, True)
|
||||||
_finish(m, w)
|
_finish(m, w)
|
||||||
|
|
||||||
class ReplaceAll(method.Method):
|
class ReplaceAll(method.Method):
|
||||||
|
@ -62,7 +62,6 @@ def _find_next(m, move=False):
|
||||||
(m.p1, m.p2) = (None, None)
|
(m.p1, m.p2) = (None, None)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
#newc = searchutil.find_next(r, w, move, start=c.add(1, 0))
|
|
||||||
newc = searchutil.find_next(r, w, move, start=c.add(0, 0))
|
newc = searchutil.find_next(r, w, move, start=c.add(0, 0))
|
||||||
if newc:
|
if newc:
|
||||||
(m.p1, m.p2) = newc
|
(m.p1, m.p2) = newc
|
||||||
|
|
|
@ -10,7 +10,7 @@ class IllegalPatternError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def escape_literal(s):
|
def escape_literal(s):
|
||||||
return regex.meta_chars.sub(r'\\\1', s)
|
return re.escape(s)
|
||||||
|
|
||||||
def find_ranges(r, w, start=None, end=None):
|
def find_ranges(r, w, start=None, end=None):
|
||||||
if not w.buffer.lines:
|
if not w.buffer.lines:
|
||||||
|
|
Loading…
Reference in New Issue