Skip to content

Commit

Permalink
Clear stack of edit events after pasting opened file's content.
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelalegre committed Apr 8, 2019
1 parent 7742fec commit f299dd2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/nammu/controller/NammuController.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def openFile(self, event=None):
# we dont highlight before the full file is loaded
runSwingLater(self.initHighlighting)


# TODO: Else, prompt user to choose again before closing

# Update settings with current file's path
Expand All @@ -212,6 +213,9 @@ def openFile(self, event=None):
# Finally, refresh the edit area to propagate custom font settings
self.atfAreaController.refreshEditArea()

# Clear stack of edits
self.atfAreaController.view.undo_manager.discardAllEdits()

def initHighlighting(self):
'''
A helper function to be called when we need to initialise syntax
Expand Down

0 comments on commit f299dd2

Please sign in to comment.