emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/popup 4265237 164/184: Fixed compatible to display line nu


From: ELPA Syncer
Subject: [nongnu] elpa/popup 4265237 164/184: Fixed compatible to display line numbers mode in Emacs 26.1 or after.
Date: Wed, 6 Oct 2021 00:01:35 -0400 (EDT)

branch: elpa/popup
commit 4265237a923d114fdb07c873ec96f8233a95874b
Author: jenchieh <jcs090218@gmail.com>
Commit: jenchieh <jcs090218@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.pub@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]