Skip to content

Commit

Permalink
Overrode setTextBuffer method so that it tells controller when the po…
Browse files Browse the repository at this point in the history
…pup's text buffer has changed.
  • Loading branch information
aaxu committed Jan 11, 2018
1 parent 829c24f commit 216c5ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,6 @@ def __init__(self, host):
self.host = host
self.controller = app.cu_editor.PopupController(self)
self.setTextBuffer(app.text_buffer.TextBuffer())
self.controller.setTextBuffer(self.textBuffer)
self.longestLineLength = 0
self.message = []
self.showOptions = True
Expand Down Expand Up @@ -1170,6 +1169,10 @@ def setMessage(self, message):
self.message = message.split("\n")
self.longestLineLength = max([len(line) for line in self.message])

def setTextBuffer(self, textBuffer):
Window.setTextBuffer(self, textBuffer)
self.controller.setTextBuffer(textBuffer)

def unfocus(self):
self.hide()
Window.unfocus(self)
Expand Down

0 comments on commit 216c5ac

Please sign in to comment.