Closed jalvesaq closed 9 years ago
Weird.
There is a test that checks whether the value is above -1. Silly me believed the documentation.
Can you open a PR replacing the old if
with yours? (no need for the local variable in this case either).
Don't know why it throws the error, because the return values are correct. Thanks for the bug!
EDIT:
I tested this solution and read a bit of documentation and it doesn't really solve the issue.
bufexists()
returns 1 after the thesaurus window has opened once, even if it is closed.
May I ask why are you setting these debug options in your normal work?
EDIT2: I've found a working solution. I will open a PR soon. Thanks again!
Sorry, I did see your edits your comment above. Please, ignore my PR and go ahead fixing the issue.
I guess you only read the email. I should have probably write the updates in a new comment so you would get them by email too.
I really appreciate you took the time making the PR :+1: You can take a look at mine (#26).
Fixed in #26
When I run
:OnlineThesaurusCurrentWord
I get this error message:To reproduce the bug, you have to put in your vimrc:
I think that this is a Vim bug because the function
bufwinnr()
should return-1
without error if the buffer does not exist, but you can avoid it with the following code: