[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popon 6d7ee4f32b 07/15: Don't mess up line numbers
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popon 6d7ee4f32b 07/15: Don't mess up line numbers |
Date: |
Sun, 22 May 2022 12:59:18 -0400 (EDT) |
branch: elpa/popon
commit 6d7ee4f32b6efc42045104c04088115de49b7d30
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Don't mess up line numbers
---
popon.el | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/popon.el b/popon.el
index cd14e332ce..87985ecc6e 100644
--- a/popon.el
+++ b/popon.el
@@ -262,10 +262,13 @@ when LINE-BEGINNINGS was calculated.")
(unless line
(setq line i)
(setf (alist-get mark point-to-line) line))
- (push (list (string-trim-right (buffer-substring mark (point))
- "\n")
- nil line mark (point))
- framebuffer))
+ (let ((str (buffer-substring mark (point)))
+ (disp-str (string-trim-right
+ (buffer-substring mark (point))
+ "\n")))
+ (push (list (string-trim-right disp-str) nil line mark
+ (if (equal str disp-str) (point) (1- (point))))
+ framebuffer)))
(push (cons mark (point)) line-boundaries)
(setq mark (point)))))
(let ((line-beginnings nil))
@@ -317,12 +320,6 @@ when LINE-BEGINNINGS was calculated.")
(cdr line)))
(setq current-offset (car line)))
(add-face-text-property 0 (length text) 'default 'append text)
- (when (or (not (= (cdar block) (point-max)))
- (not (< (caar block) (cdar block)))
- (equal (buffer-substring-no-properties
- (1- (cdar block)) (cdar block))
- "\n"))
- (setq text (concat text "\n")))
text))))))
(defun popon--redisplay-1 (force)
- [nongnu] branch elpa/popon created (now aed8ff598d), ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon cbcfb8d978 03/15: Fix problem with buffer without final newline, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 6d7ee4f32b 07/15: Don't mess up line numbers,
ELPA Syncer <=
- [nongnu] elpa/popon 651b648420 06/15: Fix popon breaking on buffers without final newline, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 95c1a57d08 08/15: Fix #1 newline background at end of line, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 88d2d3ca2a 09/15: Revert "Fix #1 newline background at end of line", ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon e4d9123e0b 13/15: Fix popon beyond EOB appearing at wrong position, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 7e6a5d6ec6 02/15: Add COPYING, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 7a359994ff 05/15: Add autoload cookies, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 240fb286d8 01/15: Working implementation, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon e6e2e8dff0 10/15: Revert "Revert "Fix #1 newline background at end of line"", ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon aed8ff598d 15/15: Take the fringe width into account, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon c34dd56fbd 04/15: Add installation instruction, ELPA Syncer, 2022/05/22