mercurial/crecord.py
changeset 51387 47c74c120205
parent 51386 6fb4d2dfa8e4
child 51388 d0f6b96d1fb8
--- a/mercurial/crecord.py	Wed Feb 14 22:50:00 2024 -0500
+++ b/mercurial/crecord.py	Wed Feb 14 22:53:58 2024 -0500
@@ -1939,6 +1939,20 @@
 
         return matches
 
+    def searchdirection(self, failuremsg, forward=True):
+        if not self.regex:
+            return
+
+        if not self.showsearch(self.regex, forward=forward):
+            win = curses.newwin(1, self.xscreensize, self.yscreensize - 1, 0)
+            self.printstring(win, failuremsg, pairname=b"legend", align=False)
+            while win.getkey() not in ["\n", "KEY_ENTER"]:
+                pass
+            del win
+
+            self.stdscr.clear()
+            self.stdscr.refresh()
+
     def handlekeypressed(self, keypressed, test=False):
         """
         Perform actions based on pressed keys.