mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-15 21:37:09 +09:00
Fix infobar prompt
This commit is contained in:
@@ -62,16 +62,17 @@ func (i *InfoBuf) Error(msg ...interface{}) {
|
||||
// TODO: add to log?
|
||||
}
|
||||
|
||||
func (i *InfoBuf) Prompt(msg string, callback func(string, bool)) {
|
||||
func (i *InfoBuf) Prompt(prompt string, msg string, callback func(string, bool)) {
|
||||
// If we get another prompt mid-prompt we cancel the one getting overwritten
|
||||
if i.HasPrompt {
|
||||
i.DonePrompt(true)
|
||||
}
|
||||
|
||||
i.Msg = msg
|
||||
i.Msg = prompt
|
||||
i.HasPrompt = true
|
||||
i.HasMessage, i.HasError = false, false
|
||||
i.PromptCallback = callback
|
||||
i.Buffer.Insert(i.Buffer.Start(), msg)
|
||||
}
|
||||
|
||||
func (i *InfoBuf) DonePrompt(canceled bool) {
|
||||
|
||||
Reference in New Issue
Block a user