[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/why-this cd7ae57770 1/2: Fix showing messages for region
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/why-this cd7ae57770 1/2: Fix showing messages for region |
Date: |
Tue, 29 Nov 2022 03:59:51 -0500 (EST) |
branch: elpa/why-this
commit cd7ae577704efa2113650e199d12cc20102f368a
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Fix showing messages for region
---
why-this.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/why-this.el b/why-this.el
index 41e044359f..93bc56c18f 100644
--- a/why-this.el
+++ b/why-this.el
@@ -369,11 +369,12 @@ TIME-FORMAT is used to format data."
(while why-this--overlays
(delete-overlay (pop why-this--overlays)))
(when why-this-mode
- (let* ((line (line-number-at-pos (if (use-region-p)
- (region-end)
- (point))))
- (begin line)
- (end (1+ line))
+ (let* ((begin (line-number-at-pos (if (use-region-p)
+ (region-beginning)
+ (point))))
+ (end (1+ (line-number-at-pos (if (use-region-p)
+ (region-end)
+ (point)))))
(backend why-this--backend)
(data (funcall backend 'line-data begin end)))
(dolist (i (number-sequence 0 (- end begin 1)))