X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=blobdiff_plain;f=lightcards%2Fdisplay.py;fp=lightcards%2Fdisplay.py;h=e74e554c7d39938c1941c3b43ac7779382889866;hp=b1e6022728fd0102d2b7a173983d4ed23cdcd797;hb=ecfe3af80939a4a02bc2efabe849e5348103afff;hpb=f8ed3a58e0cc7faa678d83bcdce27ff2da362dd2 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"""