[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d56ddaa 006/173: Allow scrolling the doc window with the m
From: |
Dmitry Gutov |
Subject: |
[elpa] master d56ddaa 006/173: Allow scrolling the doc window with the mouse wheel |
Date: |
Thu, 23 Jun 2016 00:28:34 +0000 (UTC) |
branch: master
commit d56ddaa1671d19350765824b4f480db6c8aa84ca
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Allow scrolling the doc window with the mouse wheel
Resolves #309
---
NEWS.md | 1 +
company.el | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index c8dd158..d4b767d 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
## Next
+* The documentation buffer window can be scrolled with the mouse wheel.
* New command `company-diag`. Use it in bug reports.
## 2015-02-02 (0.8.10)
diff --git a/company.el b/company.el
index a594f70..eae36ef 100644
--- a/company.el
+++ b/company.el
@@ -2015,7 +2015,7 @@ character, stripping the modifiers. That character must
be a digit."
(current-buffer)))
(defvar company--electric-commands
- '(scroll-other-window scroll-other-window-down)
+ '(scroll-other-window scroll-other-window-down mwheel-scroll)
"List of Commands that won't break out of electric commands.")
(defmacro company--electric-do (&rest body)
@@ -2029,9 +2029,12 @@ character, stripping the modifiers. That character must
be a digit."
(and (< (window-height) height)
(< (- (window-height) row 2) company-tooltip-limit)
(recenter (- (window-height) row 2)))
- (while (memq (setq cmd (key-binding (vector (list (read-event)))))
+ (while (memq (setq cmd (key-binding (read-key-sequence-vector nil)))
company--electric-commands)
- (call-interactively cmd))
+ (condition-case err
+ (call-interactively cmd)
+ ((beginning-of-buffer end-of-buffer)
+ (message (error-message-string err)))))
(company--unread-last-input)))))
(defun company--unread-last-input ()
- [elpa] master 12f55f5 013/173: Buf was unused, (continued)
- [elpa] master 12f55f5 013/173: Buf was unused, Dmitry Gutov, 2016/06/22
- [elpa] master e94f2ec 008/173: company-show-doc-buffer: Still call doc-buffer inside the electric block, Dmitry Gutov, 2016/06/22
- [elpa] master 125a4da 009/173: company-show-location: Mirror the latest change to company-show-doc-buffer, Dmitry Gutov, 2016/06/22
- [elpa] master 7941f6e 010/173: company-diag: Include Emacs and Company versions, Dmitry Gutov, 2016/06/22
- [elpa] master 5733f2b 011/173: company-diag: Fix the annotation call, Dmitry Gutov, 2016/06/22
- [elpa] master af962d4 012/173: company-diag: Call `annotation' in the right buffer, Dmitry Gutov, 2016/06/22
- [elpa] master 5e107fd 015/173: Accept numeric argument in company-select-next and friends, Dmitry Gutov, 2016/06/22
- [elpa] master 479c676 021/173: Don't use `forward-symbol', apparently it's not in 24.3, Dmitry Gutov, 2016/06/22
- [elpa] master 41f4536 018/173: Add missing require to `company-gtags`, Dmitry Gutov, 2016/06/22
- [elpa] master b0f206a 020/173: Handle function pointers in annotation and template expansion, Dmitry Gutov, 2016/06/22
- [elpa] master d56ddaa 006/173: Allow scrolling the doc window with the mouse wheel,
Dmitry Gutov <=
- [elpa] master a7a4ba6 014/173: Merge branch 'release', Dmitry Gutov, 2016/06/22
- [elpa] master 464a458 022/173: company-lighter: dispatch on whether company-candidates is non-nil, Dmitry Gutov, 2016/06/22
- [elpa] master b94b115 025/173: company--insert-candidate: Don't insert an empty string, Dmitry Gutov, 2016/06/22
- [elpa] master decd537 030/173: Add MELPA badge, Dmitry Gutov, 2016/06/22
- [elpa] master 22ecb92 001/173: company-clang--start-process: Disable undo in the output buffer, Dmitry Gutov, 2016/06/22
- [elpa] master 5fe84a2 028/173: Merge pull request #334 from vermiculus/patch-1, Dmitry Gutov, 2016/06/22
- [elpa] master 2de213e 032/173: company-dabbrev--search-buffer: Save match data, Dmitry Gutov, 2016/06/22
- [elpa] master a0ba593 029/173: Drop githalytics link, Dmitry Gutov, 2016/06/22
- [elpa] master 6301093 023/173: Clarify the meaning of cdr in the prefix cons, Dmitry Gutov, 2016/06/22
- [elpa] master 9f67f1e 027/173: Fix docstring, Dmitry Gutov, 2016/06/22