mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Rectify allout-widgets region undecoration so item at start is not missed.
* lisp/allout-widgets.el (allout-widgets-undecorate-region): Reorganize the loop so an item at the start is not skipped.
This commit is contained in:
parent
dd7c191291
commit
33d85cb768
1 changed files with 14 additions and 11 deletions
|
|
@ -2060,19 +2060,22 @@ Optional FORCE means force reassignment of the region property."
|
||||||
;;;_ > allout-widgets-undecorate-region (start end)
|
;;;_ > allout-widgets-undecorate-region (start end)
|
||||||
(defun allout-widgets-undecorate-region (start end)
|
(defun allout-widgets-undecorate-region (start end)
|
||||||
"Eliminate widgets and decorations for all items in region from START to END."
|
"Eliminate widgets and decorations for all items in region from START to END."
|
||||||
(let ((next start)
|
(let (done next widget
|
||||||
widget)
|
(end (or end (point-max))))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char start)
|
(goto-char start)
|
||||||
(while (< (setq next (next-single-char-property-change next
|
(while (not done)
|
||||||
'display
|
(when (and (allout-on-current-heading-p)
|
||||||
(current-buffer)
|
(setq widget (allout-get-item-widget)))
|
||||||
end))
|
(if widget
|
||||||
end)
|
(allout-widgets-undecorate-item widget t)))
|
||||||
(goto-char next)
|
(goto-char (setq next
|
||||||
(when (setq widget (allout-get-item-widget))
|
(next-single-char-property-change (point)
|
||||||
;; if the next-property/overly progression got us to a widget:
|
'display
|
||||||
(allout-widgets-undecorate-item widget t))))))
|
(current-buffer)
|
||||||
|
end)))
|
||||||
|
(if (>= next end)
|
||||||
|
(setq done t))))))
|
||||||
;;;_ > allout-widgets-undecorate-text (text)
|
;;;_ > allout-widgets-undecorate-text (text)
|
||||||
(defun allout-widgets-undecorate-text (text)
|
(defun allout-widgets-undecorate-text (text)
|
||||||
"Eliminate widgets and decorations for all items in TEXT."
|
"Eliminate widgets and decorations for all items in TEXT."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue