org-list: small bug fix in org-list-struct-apply-struct

* lisp/org-list.el (org-list-struct-apply-struct): if end of list was
  at eol, for example, with list inside a block, the last list
  wouldn't be shifted. Thus, the patch ensures no blank lines is
  skipped.
This commit is contained in:
Nicolas Goaziou 2011-01-23 21:59:36 +01:00
parent 304e8f1cd2
commit 0850948dea
1 changed files with 2 additions and 1 deletions

View File

@ -1572,7 +1572,8 @@ Initial position of cursor is restored after the changes."
;; Start from the line before END.
(lambda (end beg delta)
(goto-char end)
(forward-line -1)
(skip-chars-backward " \r\t\n")
(beginning-of-line)
(while (or (> (point) beg)
(and (= (point) beg) (not (org-at-item-p))))
(when (org-looking-at-p "^[ \t]*\\S-")