mtth / scratch.vim

Unobtrusive scratch window
MIT License
395 stars 32 forks source link

scratch window doesnot close on leaving InsertMode #26

Closed praveenkumark1508 closed 6 years ago

praveenkumark1508 commented 6 years ago

Hello, I have configured g:scratch_persistence_file option and set the g:scratch_autohide and g:scratch_insert_autohide to 1. When I open vim for the first time and triggered the scratch buffer by pressing 'gs' the scratch window open but when I press the scratch window doesnot close. Because the bufwinnr(bufnr('#')) will return -1. But if I close the scratch window manually and open it agian and then press , it will close automatically.

image The above screenshot shows the piece of code where the problem is there.

Thank you.