From 6753a1ea540b888e9dc4da36d74adb12e1472624 Mon Sep 17 00:00:00 2001 From: Benjamin Kirkbride Date: Mon, 3 Jul 2023 19:16:20 -0400 Subject: [PATCH] fix crash in case no filetype --- porcupine/plugins/markdown.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/porcupine/plugins/markdown.py b/porcupine/plugins/markdown.py index 5fca22300..0fe987229 100644 --- a/porcupine/plugins/markdown.py +++ b/porcupine/plugins/markdown.py @@ -45,7 +45,7 @@ def on_tab_key( tab: tabs.FileTab, event: tkinter.Event[textutils.MainText], shift_pressed: bool ) -> str | None: """Indenting and dedenting list items""" - if tab.settings.get("filetype_name", str) == "Markdown": + if tab.settings.get("filetype_name", object) == "Markdown": line = event.widget.get("insert linestart", "insert lineend") list_item_status = _list_item(line) @@ -70,7 +70,7 @@ def continue_list(tab: tabs.FileTab, event: tkinter.Event[tkinter.Text]) -> str This happens after the `autoindent` plugin automatically handles indentation """ - if tab.settings.get("filetype_name", str) == "Markdown": + if tab.settings.get("filetype_name", object) == "Markdown": current_line = event.widget.get("insert - 1l linestart", "insert -1l lineend") list_item_match = _list_item(current_line) if list_item_match: