'Insert a text into the text buffer, taking care of ,
, self.user_started.
:param text: The text to insert into the textbuffer
:return: None'

def insert_into_textbuffer(self, text):

    iterl = self.textbuffer.get_end_iter()
    if text.startswith('\r'):
        iterl.backward_line()
        delete_start = iterl
        text = text[1:]
        text_length = len(text)
        iterini = self.textbuffer.get_start_iter()
        old_text = self.textbuffer.get_text(iterini, delete_start)
        old_text_length = len(old_text)
        delete_end = self.textbuffer.get_iter_at_offset((text_length + old_text_length))
        self.textbuffer.delete(iterl, delete_end)
    self.textbuffer.insert(iterl, text)
    self.scroll_to_mark(self.textbuffer.get_insert(), 0)
    iterl = self.textbuffer.get_end_iter()
    self.textbuffer.place_cursor(iterl)
    self.cursorLimit = self.textbuffer.get_property('cursor-position')
    self.user_started = self.textbuffer.create_mark('user-input', iterl, True)
