Fix bug when tab or spaces is inserted before snippet