]> git.lizzy.rs Git - micro.git/commitdiff
Make yes/no prompts case-insensitive (#2182)
authorjohn-batch <70102999+john-batch@users.noreply.github.com>
Sat, 14 Aug 2021 03:56:26 +0000 (05:56 +0200)
committerGitHub <noreply@github.com>
Sat, 14 Aug 2021 03:56:26 +0000 (23:56 -0400)
internal/action/infopane.go

index b85a49b34a75f677568f9500f9337ae95f7d3692..7fad9ad6bebb0282d58f486d58a845b55b5a31ea 100644 (file)
@@ -93,10 +93,10 @@ func (h *InfoPane) HandleEvent(event tcell.Event) {
                done := h.DoKeyEvent(ke)
                hasYN := h.HasYN
                if e.Key() == tcell.KeyRune && hasYN {
-                       if e.Rune() == 'y' && hasYN {
+                       if (e.Rune() == 'y' || e.Rune() == 'Y') && hasYN {
                                h.YNResp = true
                                h.DonePrompt(false)
-                       } else if e.Rune() == 'n' && hasYN {
+                       } else if (e.Rune() == 'n' || e.Rune() == 'N') && hasYN {
                                h.YNResp = false
                                h.DonePrompt(false)
                        }