From 448bcd8ebefb9f2a1e1db2986ec7b1c16edab0df Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 24 Feb 2015 22:39:51 +0200 Subject: [PATCH] company-show-doc-buffer: Bind other-window-scroll-buffer --- company.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/company.el b/company.el index eae36ef6f..eb322677d 100644 --- a/company.el +++ b/company.el @@ -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)))) -- 2.39.2