]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/display.py
Fix open in external editor
[lightcards.git] / lightcards / display.py
index b1e6022728fd0102d2b7a173983d4ed23cdcd797..e74e554c7d39938c1941c3b43ac7779382889866 100644 (file)
@@ -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"""