edit: Re-support tips

buffer now also keeps the position of the cursor.
edit: Add a pos struct to storage position