def onShortcutUnindentWithBackspace(self):
        """Backspace pressed, unindent
        """
        assert self._qpart.textBeforeCursor().endswith(self.text())

        charsToRemove = len(self._qpart.textBeforeCursor()) % len(self.text())
        if charsToRemove == 0:
            charsToRemove = len(self.text())

        cursor = self._qpart.textCursor()
        cursor.setPosition(cursor.position() - charsToRemove, QTextCursor.KeepAnchor)
        cursor.removeSelectedText()
def _get_selected_path(self):
        """
        Helper function to get the selected path

        @return Gtk.TreePath : returns exactly one path for the selected object
                               or None
        """
        selection = self.get_selection()
        if selection:
            model, selected_paths = self.get_selection().get_selected_rows()
            if selected_paths:
                return selected_paths[0]
        return None