branch: elpa/popup commit 4265237a923d114fdb07c873ec96f8233a95874b Author: jenchieh <jcs090...@gmail.com> Commit: jenchieh <jcs090...@gmail.com>
Fixed compatible to display line numbers mode in Emacs 26.1 or after. --- popup.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/popup.el b/popup.el index 1b8b3c8..c9be320 100644 --- a/popup.el +++ b/popup.el @@ -5,7 +5,7 @@ ;; Author: Tomohiro Matsuyama <m2ym....@gmail.com> ;; Keywords: lisp ;; Version: 0.5.4 -;; Package-Requires: ((cl-lib "0.5")) +;; Package-Requires: ((emacs "26.1") (cl-lib "0.5")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -150,6 +150,8 @@ untouched." (defun popup-vertical-motion (column direction) "A portable version of `vertical-motion'." + (when display-line-numbers-mode + (setq column (- column (line-number-display-width 'columns)))) (if (>= emacs-major-version 23) (vertical-motion (cons column direction)) (vertical-motion direction)