Do not remove path element when cursor position is not end of line