if !hadYN {
if i.PromptCallback != nil {
if canceled {
+ i.Replace(i.Start(), i.End(), "")
i.PromptCallback("", true)
h := i.History[i.PromptType]
i.History[i.PromptType] = h[:len(h)-1]
} else {
resp := string(i.LineBytes(0))
+ i.Replace(i.Start(), i.End(), "")
i.PromptCallback(resp, false)
h := i.History[i.PromptType]
h[len(h)-1] = resp
}
// i.PromptCallback = nil
}
- i.Replace(i.Start(), i.End(), "")
}
if i.YNCallback != nil && hadYN {
i.YNCallback(i.YNResp, canceled)