Added if else for autocmd of last editing position func