def onChange(self):
    if (self.mode == 0):
        return
    tb = self.host.textBuffer
    lines = []
    if len(tb.lines):
        lineCursor = self.host.scrollRow
        line = ''
        if (len(tb.lines) > lineCursor):
            while ((len(line) == 0) and (lineCursor > 0)):
                line = tb.lines[lineCursor]
                lineCursor -= 1
        if len(line):
            indent = (len(line) - len(line.lstrip(u' ')))
            lineCursor += 1
            while (lineCursor < len(tb.lines)):
                line = tb.lines[lineCursor]
                if (not len(line)):
                    continue
                z = (len(line) - len(line.lstrip(u' ')))
                if (z > indent):
                    indent = z
                    lineCursor += 1
                else:
                    break
            while (indent and (lineCursor > 0)):
                line = tb.lines[lineCursor]
                if len(line):
                    z = (len(line) - len(line.lstrip(u' ')))
                    if (z < indent):
                        indent = z
                        lines.append(line)
                lineCursor -= 1
    pathLine = app.string.pathEncode(self.host.textBuffer.fullPath)
    if 1:
        if tb.isReadOnly:
            pathLine += u' [RO]'
    if 1:
        if tb.isDirty():
            pathLine += u' * '
        else:
            pathLine += u' . '
    lines.append(pathLine[(- self.cols):])
    self.lines = lines
    infoRows = len(self.lines)
    if (self.mode > 0):
        infoRows = self.mode
    if (self.borrowedRows != infoRows):
        self.host.topRows = infoRows
        self.host.layout()
        self.borrowedRows = infoRows
def onChange(self):
    if (self.mode == 0):
        return
    tb = self.host.textBuffer
    lines = []
    if len(tb.lines):
        lineCursor = self.host.scrollRow
        line = 
        if (len(tb.lines) > lineCursor):
            while ((len(line) == 0) and (lineCursor > 0)):
                line = tb.lines[lineCursor]
                lineCursor -= 1
        if len(line):
            indent = (len(line) - len(line.lstrip(u' ')))
            lineCursor += 1
            while (lineCursor < len(tb.lines)):
                line = tb.lines[lineCursor]
                if (not len(line)):
                    continue
                z = (len(line) - len(line.lstrip(u' ')))
                if (z > indent):
                    indent = z
                    lineCursor += 1
                else:
                    break
            while (indent and (lineCursor > 0)):
                line = tb.lines[lineCursor]
                if len(line):
                    z = (len(line) - len(line.lstrip(u' ')))
                    if (z < indent):
                        indent = z
                        lines.append(line)
                lineCursor -= 1
    pathLine = app.string.pathEncode(self.host.textBuffer.fullPath)
    if 1:
        if tb.isReadOnly:
            pathLine += u' [RO]'
    if 1:
        if tb.isDirty():
            pathLine += u' * '
        else:
            pathLine += u' . '
    lines.append(pathLine[(- self.cols):])
    self.lines = lines
    infoRows = len(self.lines)
    if (self.mode > 0):
        infoRows = self.mode
    if (self.borrowedRows != infoRows):
        self.host.topRows = infoRows
        self.host.layout()
        self.borrowedRows = infoRows