Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiK002 authored Feb 9, 2023
1 parent 5dadaaa commit bafb312
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -229,7 +229,7 @@ def update_window_title(self, string):
def bring_to_front(window: Tk | Toplevel):
window.attributes('-topmost', True)
window.focus_set()
window.after(200, lambda: [window.attributes('-topmost', False)])
window.after(100, lambda: [window.attributes('-topmost', False)])

def toggle_pin_window_to_top(self):
if self.pin_state.get() == "true":
@@ -322,7 +322,7 @@ def draw_app_layout(self):
self.mainframe.columnconfigure(0, weight=1)
self.mainframe.rowconfigure(0, weight=1)

self.editor = Text(self.mainframe, width=500, wrap=NONE)
self.editor = Text(self.mainframe, width=500, wrap=NONE, undo=True)
self.editor.grid(row=0, column=0, sticky=NSEW)
self.editor.bind("<KeyRelease>", lambda _: self.is_file_saved())
self.editor.focus_set()
@@ -898,3 +898,4 @@ def save_before_closing_instance(self):
shard.create_instance()

shard.start()

0 comments on commit bafb312

Please sign in to comment.