changeset 51386:d0f6b96d1fb8

crecord: add handle(next|prev)search functions These are now just simple wrappers around `searchdirection`
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 14 Feb 2024 22:54:21 -0500
parents 47c74c120205
children 0e063a9b764a
files mercurial/crecord.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.