mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-07 13:20:21 +09:00
@@ -137,11 +137,13 @@ func (i *InfoBuf) DonePrompt(canceled bool) {
|
||||
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
|
||||
@@ -156,7 +158,6 @@ func (i *InfoBuf) DonePrompt(canceled bool) {
|
||||
}
|
||||
// i.PromptCallback = nil
|
||||
}
|
||||
i.Replace(i.Start(), i.End(), "")
|
||||
}
|
||||
if i.YNCallback != nil && hadYN {
|
||||
i.YNCallback(i.YNResp, canceled)
|
||||
|
||||
Reference in New Issue
Block a user