company-mode / company-quickhelp

Documentation popup for Company
GNU General Public License v3.0
374 stars 33 forks source link

Error running timer ‘company-quickhelp--show’: (wrong-type-argument overlayp nil) #108

Closed wyuenho closed 4 years ago

wyuenho commented 4 years ago

This seems to show up when there's only one candidate and no company tooltip is showing.

wyuenho commented 4 years ago

@dgutov https://github.com/company-mode/company-quickhelp/commit/9a0d860580d5b9359cb0a70ed1fc7bb294bbbaff broke things. Clearly every other variable in the let* bindings makes no assumption for the existence of the overlay but this line does, so it occasionally shows an error.

mahito1594 commented 4 years ago

I get the same trouble. I am not very familiar with Emacs Lisp, but I think that it is sufficient to replace the code at line 192 with something like

(goto-char (if ovl (min (overlay-start ovl) (point)) (point)))
wyuenho commented 4 years ago

Since there's a check for the existence of ovl and doc below, that whole block of variables can be moved inside instead of adding unnecessary checks for ovl all over the place.

dgutov commented 4 years ago

Thanks for the report and the patch!