diff --git a/main.py b/main.py index ea72d04..2ae3c03 100644 --- a/main.py +++ b/main.py @@ -49,7 +49,7 @@ class Berry(App): Binding(self.bindings["open"], "open", "Open File"), Binding(self.bindings["save"], "save", "Save File"), Binding(self.bindings["save-as"], "save_as", "Save File As..."), - Binding(self.bindings["find"], "find", "Find and Replace"), + Binding(self.bindings["find"], "find", "Find and Replace", priority=True), # this is priority because otherwise TextArea overrides it Binding(self.bindings["settings"], "settings", "Settings"), ) @@ -181,7 +181,7 @@ class Berry(App): ), ), - icon="🔍", + icon="󰍉", start_open=True, allow_resize=False, allow_maximize=False, @@ -333,8 +333,8 @@ class Berry(App): def done_saving(self, result): if result is None: return - with open(result, "w", encoding="utf-8") as f: - f.write(self.query_one("#code-editor").text) + #with open(result, "w", encoding="utf-8") as f: + # f.write(self.query_one("#code-editor").text) tabs: Tabs = self.query_one("#file-tabs") tabs.active_tab.label = os.path.basename(result) @@ -345,7 +345,7 @@ class Berry(App): self.push_screen(FileSave(), callback=self.done_saving) def action_save(self): - if self.open_file == None and self.query_one("#code-editor").disabled == False: + if self.open_file == None: self.action_save_as() # dont bother saving if there are no new changes