[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eat ebdbba0c4b 09/12: Use third argument of posn-col-row o
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eat ebdbba0c4b 09/12: Use third argument of posn-col-row on Emacs >= 29 |
Date: |
Sun, 27 Nov 2022 15:59:30 -0500 (EST) |
branch: elpa/eat
commit ebdbba0c4bc95383aa3eedb196cc6b37eb3880c5
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Use third argument of posn-col-row on Emacs >= 29
* eat.el (eat-term-input-event): Use USE-WINDOW argument of
'posn-col-row' to support text scaling properly, but only on
Emacs >= 29 since on Emacs 28 'posn-col-row' takes only one
argument.
---
eat.el | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/eat.el b/eat.el
index 150a4353bb..aa048a401d 100644
--- a/eat.el
+++ b/eat.el
@@ -4438,7 +4438,9 @@ client process may get confused."
(pos (if (memq 'drag modifiers)
(event-end mouse)
(event-start mouse)))
- (x-y (posn-col-row pos 'use-window))
+ (x-y (if (< emacs-major-version 29)
+ (posn-col-row pos)
+ (posn-col-row pos 'use-window)))
(x (1+ (car x-y)))
(y (1+ (cdr x-y)))
(button
@@ -4453,7 +4455,9 @@ client process may get confused."
(cl-incf b 16))
b)))
(when ref-pos
- (let ((ref-x-y (posn-col-row ref-pos 'use-window)))
+ (let ((ref-x-y (if (< emacs-major-version 29)
+ (posn-col-row ref-pos)
+ (posn-col-row ref-pos 'use-window))))
(cl-decf x (car ref-x-y))
(cl-decf y (cdr ref-x-y))))
(when (and (<= 1 x (eat--t-disp-width disp))
@@ -4527,16 +4531,22 @@ client process may get confused."
(pred mouse-movement-p)
movement)
(let* ((pos (event-start movement))
- (x (1+ (car (posn-col-row pos))))
- (y (1+ (cdr (posn-col-row pos))))
+ (x-y (if (< emacs-major-version 29)
+ (posn-col-row pos)
+ (posn-col-row pos 'use-window)))
+ (x (1+ (car x-y)))
+ (y (1+ (cdr x-y)))
(button
(if (car (eat--t-term-mouse-pressed terminal))
(+ (car (eat--t-term-mouse-pressed terminal))
32)
35)))
(when ref-pos
- (cl-decf x (car (posn-col-row ref-pos)))
- (cl-decf y (cdr (posn-col-row ref-pos))))
+ (let ((ref-x-y (if (< emacs-major-version 29)
+ (posn-col-row ref-pos)
+ (posn-col-row ref-pos 'use-window))))
+ (cl-decf x (car ref-x-y))
+ (cl-decf y (cdr ref-x-y))))
(when (and (or (eq (eat--t-term-mouse-mode terminal)
'any-event)
(/= button 35))
- [nongnu] branch elpa/eat created (now 999c779bfc), ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat ae4322fb45 06/12: Add documentation file generation code to Makefile, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat ed4d4ea6de 05/12: ; Fix outdated key sequences in README.org, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat 06e45d68b9 01/12: Implement the terminal, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat 469b457238 04/12: ; Fix typo in code in Quelpa section in README.org, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat f65a6b0188 11/12: ; * eat.el: Use ?\s everywhere as space character, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat 3464e6b68c 03/12: ; Fix typo in summany line, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat 99dacbbf52 02/12: Add proper dependencies to targets in Makefile, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat 1035d99185 07/12: * Makefile (all): Remove "check" and "changelog.", ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat 9eadacb243 10/12: ; * .dir-locals.el: No tabs and 70 column limit, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat ebdbba0c4b 09/12: Use third argument of posn-col-row on Emacs >= 29,
ELPA Syncer <=
- [nongnu] elpa/eat 0cf652a591 08/12: ; Fix :url in Quelpa recipe in README.org, ELPA Syncer, 2022/11/27
- [nongnu] elpa/eat 999c779bfc 12/12: * .elpaignore: New file., ELPA Syncer, 2022/11/27