diff --git a/src/buffer.go b/src/buffer.go index fb4d6c3d..0f91cf95 100644 --- a/src/buffer.go +++ b/src/buffer.go @@ -3,7 +3,6 @@ package main import ( "github.com/vinzmay/go-rope" "io/ioutil" - "regexp" "strings" ) @@ -112,21 +111,6 @@ func (b *Buffer) Remove(start, end int) string { return removed } -func (b *Buffer) Replace(search, replace string) error { - re, err := regexp.Compile(search) - if err != nil { - return err - } - text := re.ReplaceAllString(b.text, replace) - if text == "" { - b.r = new(rope.Rope) - } else { - b.r = rope.New(text) - } - b.Update() - return nil -} - // Len gives the length of the buffer func (b *Buffer) Len() int { return b.r.Len()