mtth / scratch.vim

Unobtrusive scratch window
MIT License
395 stars 32 forks source link

Strange error on closing scratch #31

Closed weilbith closed 5 years ago

weilbith commented 5 years ago

I have the odd problem, that if I have open NERDTree, then edit the scratch buffer and go back I can't. I get the following error and I can't do anything so I have to close the whole session. But is not occur always. It seems like only if I have a file open in a buffer (not with Startify and NERDTree reproducable. I checked the close_window function and this occurs directly after this line. By my debugging messages, no further instruction is executed, not even the if-condition blocks is leaved. So it seems to be cause by writing the persistent file. But the configured file ("~/.local/share/nvim/scratch.md") exists and it can write as stated in the log below. But then there is file mysterious FileUpdate function I can't neither in this repo, nor at NERDTree's. An also I've no idea where the stated invalid path comes from. This is the project folder, but... I was also not able to find any missing endif by linting. Unfortunately my knowledge is not enough to know how I can display the loaded functions by Vim through the SNR's. Any idea why this happens?

"~/.local/share/nvim/scratch.md" 3L, 10C written
Error detected while processing function <SNR>318_FileUpdate[13]..99[3]..102:
line   18:
E605: Exception not caught: NERDTree.InvalidArgumentsError: Invalid path = /home/thore/brainbot/projects/trustlines-network/blockchain/__Scratch__
Error detected while processing function <SNR>272_close_window:
line    5:
E171: Missing :endif
weilbith commented 5 years ago

Any feedback?

mtth commented 5 years ago

Hmm, I'm not sure. Running :verbose function will tell you where <SNR>318_FileUpdate is set; can you look for the plugin which defines it?