diff options
author | Armaan Bhojwani <me@armaanb.net> | 2021-02-14 09:33:27 -0500 |
---|---|---|
committer | Armaan Bhojwani <me@armaanb.net> | 2021-02-14 09:35:05 -0500 |
commit | ecfe3af80939a4a02bc2efabe849e5348103afff (patch) | |
tree | 869a293d081eea78ebede459792898d9ae5a93f0 | |
parent | f8ed3a58e0cc7faa678d83bcdce27ff2da362dd2 (diff) | |
download | lightcards-ecfe3af80939a4a02bc2efabe849e5348103afff.tar.gz |
Fix open in external editor
Was broken after changing the way parsing works
-rw-r--r-- | lightcards/display.py | 8 |
1 files 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""" |