Remove unused duplicate definition.

This commit is contained in:
Brian Mattern
2019-06-06 11:08:05 -07:00
parent 129f6c238a
commit 246ebfbff2

View File

@ -71,25 +71,6 @@ func (self *Entry) HandleEvent(e Event) bool {
return true
}
func TruncateFront(s string, w int, prefix string) string {
if rw.StringWidth(s) < w {
return s
}
r := []rune(s)
pw := rw.StringWidth(prefix)
w -= pw
width := 0
i := len(r) - 1
for ; i >= 0 && width <= w; i-- {
cw := rw.RuneWidth(r[i])
width += cw
if width > w {
break
}
}
return prefix + string(r[i+1:len(r)])
}
func (self *Entry) Draw(buf *Buffer) {
if self.Value == "" && !self.editing && !self.ShowWhenEmpty {
return