from shell import Shell
import version
-try:
- True
-except NameError:
- True = 1==1
- False = 1==0
-
class EditorFrame(frame.Frame):
"""Frame containing one editor."""
def getStatus(self):
"""Return (filepath, line, column) status tuple."""
- pos = self.window.GetCurrentPos()
- line = self.window.LineFromPosition(pos) + 1
- col = self.window.GetColumn(pos)
- if self.buffer:
- name = self.buffer.doc.filepath or self.buffer.name
+ if self.window:
+ pos = self.window.GetCurrentPos()
+ line = self.window.LineFromPosition(pos) + 1
+ col = self.window.GetColumn(pos)
+ if self.buffer:
+ name = self.buffer.doc.filepath or self.buffer.name
+ else:
+ name = ''
+ status = (name, line, col)
+ return status
else:
- name = ''
- status = (name, line, col)
- return status
+ return ('', 0, 0)
def getText(self):
"""Return contents of editor."""