go-eldoc icon indicating copy to clipboard operation
go-eldoc copied to clipboard

Kill existing go-eldoc buffer to prevent duplicates

Open jcmdln opened this issue 6 years ago • 0 comments

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

  1. Install melpa package and suggested go dependencies
  2. Open any .go file with something defined (variables, functions, structs, etc)
  3. 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
  4. 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.

jcmdln avatar Feb 17 '19 21:02 jcmdln