fixed snippet shift when editing