Merge pull request #62 from theendlessriver13/fix_windows_problems

fix babi crashing on win when trying to run it in the background
This commit is contained in:
Anthony Sottile
2020-05-13 14:32:39 -07:00
committed by GitHub

View File

@@ -516,10 +516,13 @@ class Screen:
return EditResult.EXIT
def background(self) -> None:
curses.endwin()
os.kill(os.getpid(), signal.SIGSTOP)
self.stdscr = _init_screen()
self.resize()
if sys.platform == 'win32': # pragma: win32 cover
self.status.update('cannot run babi in background on Windows')
else: # pragma: win32 no cover
curses.endwin()
os.kill(os.getpid(), signal.SIGSTOP)
self.stdscr = _init_screen()
self.resize()
DISPATCH = {
b'KEY_RESIZE': resize,