def _insert_at_cursor(self, middle, end = ""):
        window = self.window
        doc = window.get_active_document()
        doc.insert_at_cursor(middle + end)
        # refresh cursor and move it to the middle
        cursor = doc.get_iter_at_mark(doc.get_insert())
        cursor.set_offset(len(end) - cursor.get_offset())
        doc.place_cursor(cursor)
        return True


##### regular functions #####
dataset/ETHPy150Open nymanjens/gedit-intelligent-text-completion/gedit3-0--3-7/intelligent_text_completion.py/IntelligentTextCompletionPlugin._insert_at_cursor/swapped operands of `-`