[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ilist f021d7d8ab 20/24: fix: account for an invisible b
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ilist f021d7d8ab 20/24: fix: account for an invisible beginning |
Date: |
Tue, 28 Dec 2021 16:58:14 -0500 (EST) |
branch: externals/ilist
commit f021d7d8ab434c94b7ce49c7db22d3be61cbac44
Author: JSDurand <mmemmew@gmail.com>
Commit: JSDurand <mmemmew@gmail.com>
fix: account for an invisible beginning
* ilist.el (ilist-forward-line, ilist-forward-group-header): Take into
account the possibility that the beginning of the buffer might be
invisible.
---
ilist.el | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/ilist.el b/ilist.el
index 232dc44d5e..3e53c0c066 100644
--- a/ilist.el
+++ b/ilist.el
@@ -996,6 +996,16 @@ skipped."
(line-beginning-position)))))
(original-point (point))
(arg (abs arg)))
+ ;; if we are moving forwards, and if we are at an invisible
+ ;; boundary, add one to arg.
+ (cond
+ ((and forwardp
+ (not skip-groups)
+ (ilist-boundary-buffer-p nil)
+ (ilist-invisible-property-p
+ (ilist-get-property (point) 'invisible t)
+ buffer-invisibility-spec))
+ (setq arg (1+ arg))))
(ilist-skip-properties t forwardp
'(ilist-header ilist-title-sep) t)
(ilist-skip-properties skip-groups forwardp
@@ -1012,6 +1022,7 @@ skipped."
(setq original-point (point))
;; if point is invisible right now, first skip out of it.
(while (and (not no-skip-invisible)
+ (not (ilist-boundary-buffer-p forwardp))
(ilist-invisible-property-p
(ilist-get-property (point) 'invisible t)
buffer-invisibility-spec))
@@ -1021,10 +1032,11 @@ skipped."
((and (not forwardp)
(/= original-point (point)))
(setq arg (1- arg))))
- (while (> arg 0)
+ (while (and (> arg 0) (not (ilist-boundary-buffer-p forwardp)))
(forward-line (cond (forwardp 1) (-1)))
;; skip invisible lines if needed
(while (and (not no-skip-invisible)
+ (not (ilist-boundary-buffer-p forwardp))
(ilist-invisible-property-p
(ilist-get-property (point) 'invisible t)
buffer-invisibility-spec))
@@ -1075,6 +1087,15 @@ well."
(line-beginning-position)))))
(original-point (point))
(arg (abs arg)))
+ ;; if we are moving forwards, and if we are at an invisible
+ ;; boundary, add one to arg.
+ (cond
+ ((and forwardp
+ (ilist-boundary-buffer-p nil)
+ (ilist-invisible-property-p
+ (ilist-get-property (point) 'invisible t)
+ buffer-invisibility-spec))
+ (setq arg (1+ arg))))
(ilist-skip-properties
t forwardp '(ilist-header ilist-title-sep) t)
(cond ((and
@@ -1088,6 +1109,7 @@ well."
(setq original-point (point))
;; if point is invisible right now, first skip out of it.
(while (and (not no-skip-invisible)
+ (not (ilist-boundary-buffer-p forwardp))
(ilist-invisible-property-p
(ilist-get-property (point) 'invisible t)
buffer-invisibility-spec))
@@ -1097,10 +1119,11 @@ well."
((and (not forwardp)
(/= original-point (point)))
(setq arg (1- arg))))
- (while (> arg 0)
+ (while (and (> arg 0) (not (ilist-boundary-buffer-p forwardp)))
(forward-line (cond (forwardp 1) (-1)))
;; skip invisible lines if needed
(while (and (not no-skip-invisible)
+ (not (ilist-boundary-buffer-p forwardp))
(ilist-invisible-property-p
(ilist-get-property (point) 'invisible t)
buffer-invisibility-spec))
- [elpa] branch externals/ilist created (now b2bf67c5d8), ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 3265864faf 01/24: Initial working version, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist d03de0ea64 02/24: README, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 5ba04b79bd 03/24: * ilist.el (ilist-string): Add support for sorting., ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 457f0b0d87 06/24: no trailing whitespaces if demanded, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 4fb5695fe1 09/24: Add manuals and update README, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 95bcbf4b00 12/24: ilist: leave new lines when hiding groups, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 8b5d5f382f 22/24: Update docs, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist f021d7d8ab 20/24: fix: account for an invisible beginning,
ELPA Syncer <=
- [elpa] externals/ilist 282f60c93a 21/24: I forgot to byte-compile again. Silly me!, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist c3f0e61360 13/24: fix missing parameter, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist b2bf67c5d8 24/24: Add changelog, and update documentation, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist ed18678569 05/24: new: get group and marks, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 5362c106a8 04/24: more functionalities, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 347effebbe 07/24: fix the calculation of lengths of strings, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist ebb207c520 08/24: Fix an ilist error, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 76f29b61bb 10/24: Minor format change, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 8c4efd3d7c 11/24: add invisible text property., ELPA Syncer, 2021/12/28
- [elpa] externals/ilist c4a48491ee 15/24: fix previous bugs caused by invisibility, ELPA Syncer, 2021/12/28