mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Fix YesNoPrompt bug
This commit is contained in:
@@ -114,11 +114,14 @@ func (m *Messenger) YesNoPrompt(prompt string) (bool, bool) {
|
|||||||
switch e.Key() {
|
switch e.Key() {
|
||||||
case tcell.KeyRune:
|
case tcell.KeyRune:
|
||||||
if e.Rune() == 'y' {
|
if e.Rune() == 'y' {
|
||||||
|
m.hasPrompt = false
|
||||||
return true, false
|
return true, false
|
||||||
} else if e.Rune() == 'n' {
|
} else if e.Rune() == 'n' {
|
||||||
|
m.hasPrompt = false
|
||||||
return false, false
|
return false, false
|
||||||
}
|
}
|
||||||
case tcell.KeyCtrlC, tcell.KeyCtrlQ, tcell.KeyEscape:
|
case tcell.KeyCtrlC, tcell.KeyCtrlQ, tcell.KeyEscape:
|
||||||
|
m.hasPrompt = false
|
||||||
return false, true
|
return false, true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user