code: def remove_last_line(self):
          
          editor = self._editor
          text_cursor = editor.textCursor()
          text_cursor.movePosition(text_cursor.End, text_cursor.MoveAnchor)
          text_cursor.select(text_cursor.LineUnderCursor)
          text_cursor.removeSelectedText()
          text_cursor.deletePreviousChar()
          editor.setTextCursor(text_cursor)
docs: Removes the last line of the document.