tpope / vim-obsession

obsession.vim: continuously updated session files
http://www.vim.org/scripts/script.php?script_id=4472
1.76k stars 70 forks source link

commit d2818a61 leads vim response very slowly on Windows #73

Open roachsinai opened 2 years ago

roachsinai commented 2 years ago

GVim sometimes response after more than one seconds, and the key I pressed can show on rightbottom on Gvim like below:

image

Releated commit is https://github.com/tpope/vim-obsession/commit/d2818a614ec3a5d174c6bb19e87e2eeb207f4900

Revert to d2818a6^, above problem disappear.


Platform: Win11, vim 64-bit.

tpope commented 2 years ago

Can you narrow down the cause? If you comment out the rename, does the problem go away?

roachsinai commented 2 years ago

Yes, comment out the rename at line 85, the problem go away.

tpope commented 2 years ago

Maybe it's getting hung up overwriting the existing file? Maybe try adding a delete(g:this_obsession) before it? (Although that kind of defeats the purpose of the change.)

roachsinai commented 2 years ago

Just wanna make sure that when overwrite the existing file, does it was opened? In windows you can't move/delete an opened file.

tpope commented 2 years ago

The file in g:this_obsession shouldn't be open at that point, no.