'Apply changeset to current snippets stack, correctly moving around
snippet itself or its child.'

def _apply_change(self, change):

    if (not self._snippets_stack):
        return
    (change_type, line_number, column_number, change_text) = change[0:4]
    line_before = (line_number <= self._snippets_stack[0]._start.line)
    column_before = (column_number <= self._snippets_stack[0]._start.col)
    if (line_before and column_before):
        direction = 1
        if (change_type == 'D'):
            direction = (-1)
        diff = Position(direction, 0)
        if (len(change) != 5):
            diff = Position(0, (direction * len(change_text)))
        print (change, diff)
        self._snippets_stack[0]._move(Position(line_number, column_number), diff)
    else:
        if (line_number > self._snippets_stack[0]._end.line):
            return
        if (column_number >= self._snippets_stack[0]._end.col):
            return
        self._snippets_stack[0]._do_edit(change[0:4])
