crecord: add handle(next|prev)search functions
authorJordi Gutiérrez Hermoso <jordigh@octave.org>
Wed, 14 Feb 2024 22:54:21 -0500
changeset 51386 d0f6b96d1fb8
parent 51385 47c74c120205
child 51387 0e063a9b764a
crecord: add handle(next|prev)search functions These are now just simple wrappers around `searchdirection`
mercurial/crecord.py
--- a/mercurial/crecord.py	Wed Feb 14 22:53:58 2024 -0500
+++ b/mercurial/crecord.py	Wed Feb 14 22:54:21 2024 -0500
@@ -1953,6 +1953,16 @@
             self.stdscr.clear()
             self.stdscr.refresh()
 
+    def handlenextsearch(self):
+        self.searchdirection(
+            _(b"Next pattern not found (press ENTER)"), forward=True
+        )
+
+    def handleprevsearch(self):
+        self.searchdirection(
+            _(b"Previous pattern not found (press ENTER)"), forward=False
+        )
+
     def handlekeypressed(self, keypressed, test=False):
         """
         Perform actions based on pressed keys.