changeset 42571:3be6ff55095b

crecord: fix if -> elif when handling key presses This shouldn't actually change any behavior, I only noticed it since I started using KEY_UP in tests, and it was complaining when it got down to the ^L handler that initscr hadn't been called yet. Differential Revision: https://phab.mercurial-scm.org/D6619
author Kyle Lippincott <spectral@google.com>
date Mon, 08 Jul 2019 12:38:37 -0700
parents 75fd9421440b
children cd4f1b7c3192
files mercurial/crecord.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/crecord.py	Mon Jul 08 12:17:06 2019 -0700
+++ b/mercurial/crecord.py	Mon Jul 08 12:38:37 2019 -0700
@@ -1724,7 +1724,7 @@
         keypressed = pycompat.bytestr(keypressed)
         if keypressed in ["k", "KEY_UP"]:
             self.uparrowevent()
-        if keypressed in ["K", "KEY_PPAGE"]:
+        elif keypressed in ["K", "KEY_PPAGE"]:
             self.uparrowshiftevent()
         elif keypressed in ["j", "KEY_DOWN"]:
             self.downarrowevent()