Revert "Use byte slice for insert"

This reverts commit 0c844c2f5b.
This commit is contained in:
Zachary Yedidia
2019-01-16 22:32:33 -05:00
parent 069f7d20bc
commit 9336e09532
8 changed files with 29 additions and 25 deletions

View File

@@ -110,7 +110,7 @@ func (i *InfoBuf) Prompt(prompt string, msg string, ptype string, eventcb func(s
i.HasGutter = false
i.PromptCallback = donecb
i.EventCallback = eventcb
i.Buffer.Insert(i.Buffer.Start(), []byte(msg))
i.Buffer.Insert(i.Buffer.Start(), msg)
}
func (i *InfoBuf) YNPrompt(prompt string, donecb func(bool, bool)) {
@@ -146,7 +146,7 @@ func (i *InfoBuf) DonePrompt(canceled bool) {
}
i.PromptCallback = nil
}
i.Replace(i.Start(), i.End(), []byte{})
i.Replace(i.Start(), i.End(), "")
}
if i.YNCallback != nil && hadYN {
i.YNCallback(i.YNResp, canceled)