From ecfe3af80939a4a02bc2efabe849e5348103afff Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sun, 14 Feb 2021 09:33:27 -0500 Subject: [PATCH] Fix open in external editor Was broken after changing the way parsing works --- lightcards/display.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lightcards/display.py b/lightcards/display.py index b1e6022..e74e554 100644 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -207,11 +207,12 @@ class Menu(Panel): shuffle(self.outer.stack) self.menu_print("Stack shuffled!") elif key in self.outer.config["menu_open_file"]: - self.outer.dump() curses.endwin() os.system(f"$EDITOR {self.outer.input_file}"), (self.outer.headers, self.outer.stack) = parse.parse_html( - parse.md2html(self.outer.input_file) + parse.md2html(self.outer.input_file), + self.outer.args, + self.outer.config, ) self.outer.get_key() elif key in self.outer.config["menu_stars_only"]: @@ -254,8 +255,9 @@ class Display: self.headers = headers self.obj = obj self.view = view - self.input_file = args.inp[0] + self.input_file = args.inp self.config = conf + self.args = args def run(self, stdscr): """Set important options that require stdscr before starting""" -- 2.39.2