crecord: drop calls to `curses.endwin()` stable
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 29 Feb 2024 14:13:21 -0800
branchstable
changeset 51448 89cd0dd41e4d
parent 51447 40943970b7ae
child 51466 a43a6d4b3be6
crecord: drop calls to `curses.endwin()` We got a bug report where `curses.endwin()` failed with `_curses.error: endwin() returned ERR`. Looking at e306d552dfb12, it seems like we should be able to just remove these calls.
mercurial/crecord.py
--- a/mercurial/crecord.py	Mon Mar 04 04:16:15 2024 +0100
+++ b/mercurial/crecord.py	Thu Feb 29 14:13:21 2024 -0800
@@ -1563,7 +1563,6 @@
     def sigwinchhandler(self, n, frame):
         """handle window resizing"""
         try:
-            curses.endwin()
             self.xscreensize, self.yscreensize = scmutil.termsize(self.ui)
             self.statuswin.resize(self.numstatuslines, self.xscreensize)
             self.numpadlines = self.getnumlinesdisplayed(ignorefolding=True) + 1
@@ -1694,7 +1693,6 @@
 
         curses.raw()
         curses.def_prog_mode()
-        curses.endwin()
         self.commenttext = self.ui.edit(self.commenttext, self.ui.username())
         curses.cbreak()
         self.stdscr.refresh()