'Adds a text decoration on a CodeEditor instance
:param decoration: Text decoration to add
:type decoration: spyder.api.TextDecoration'

def append(self, decoration):

    if (decoration not in self._decorations):
        self._decorations.append(decoration)
        self._decorations = sorted(self._decorations, key=(lambda sel: sel.draw_order))
        self.editor.setExtraSelections(self._decorations)
        return True
    return False
