     lastClosedRow = parseOutput.lastClosedRow
     # A stack containing the row number where each bracket was closed.
     shouldHang = parseOutput.shouldHang
-    lastFunctionRow = parseOutput.lastFunctionRow
+    # The last row a def/for/if/elif/else/try/except etc. block started
+    lastColonRow = parseOutput.lastColonRow
 
     if shouldHang
         @indentHanging(row, @editor.buffer.lineForRow(row - 1))

            # row where it was opened
            indentLevel = @editor.indentationForBufferRow(lastClosedRow[0])

            if lastFunctionRow == row - 1
                # we just finished defining a function, need to increase indentation
                indentLevel += 1

            @editor.setIndentationForBufferRow(row, indentLevel)


                    # Similar to above, we've already skipped all irrelevant characters,
                    # so if we saw a colon earlier in this line, then we would have
                    # incorrectly thought it was the end of a def/for/if/elif/else/try/except
                    # block when it was actually a dictionary being defined, reset the
                    # lastColonRow variable to whatever it was when we started parsing this line.
                    lastColonRow = lastlastColonRow

                    if c == ':'
                        lastColonRow = row
                    else if c in '})]' and openBracketStack.length
                        # Note that the .pop() will take the element off of the openBracketStack
                        # as it adds it to the array for lastClosedRow.
