Remove unecessary function

This commit is contained in:
Zachary Yedidia
2016-04-07 14:37:54 -04:00
parent d45e19d444
commit cc80722c18

View File

@@ -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()