]> code.delx.au - gnu-emacs-elpa/commitdiff
company-show-doc-buffer: Bind other-window-scroll-buffer
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 24 Feb 2015 20:39:51 +0000 (22:39 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 24 Feb 2015 20:39:51 +0000 (22:39 +0200)
company.el

index eae36ef6f74af799f7b9214d1ea30c093d1ba255..eb322677d955447e0bbe3276609c90473eca8700 100644 (file)
@@ -2045,10 +2045,11 @@ character, stripping the modifiers.  That character must be a digit."
 (defun company-show-doc-buffer ()
   "Temporarily show the documentation buffer for the selection."
   (interactive)
-  (company--electric-do
-    (let* ((selected (nth company-selection company-candidates))
-           (doc-buffer (or (company-call-backend 'doc-buffer selected)
-                           (error "No documentation available"))))
+  (let* ((selected (nth company-selection company-candidates))
+         (doc-buffer (or (company-call-backend 'doc-buffer selected)
+                         (error "No documentation available")))
+         (other-window-scroll-buffer (get-buffer doc-buffer)))
+    (company--electric-do
       (with-current-buffer doc-buffer
         (goto-char (point-min)))
       (display-buffer doc-buffer t))))