go-eldoc
go-eldoc copied to clipboard
Kill existing go-eldoc buffer to prevent duplicates
Previously when using any of the gocode variants and rapidlytriggering go-eldoc to show eldoc info in the modebar, if the context was killed by gocode this would result in multiple go-eldoc buffers. This commit now ensures that if an initial go-eldoc buffer exists, it is killed before the new temp-buffer is created. This is really naive, though I've confirmed this solution results in no duplicate buffers being created.
Replication Steps
- Install melpa package and suggested go dependencies
- Open any
.gofile with something defined (variables, functions, structs, etc) - Based on the timeout value before go-eldoc shows the definition of what is under the cursor, move the cursor between letters in a definition
- If your timing is nearly perfect, an additional
*go-eldoc*buffer is created
Please let me know if I have not explained this well enough, I'm finding it a bit difficult to succinctly express this bug.