forked from mirrors/org-mode
Fix list bug at beginning of buffer
David Maus writes: > When `org-previous-item' is called on an item with nothing above it > Orgmode enters an infinite loop. The reason is that > `org-previous-item' searches for non-empty lines by moving point up > line by line and if there is nothing above an item point gets stuck on > begin of buffer. > > example.org > ,---- > | > | - Item > `---- > > Move point on Item, M-x org-previous-item RET and Orgmode enters the > infinite loop. > > Attached patch adds a conditional clause to `org-previous-item' that > leaves the search loop if point reaches beginning of buffer.
This commit is contained in:
parent
e78d7568ca
commit
7dc0f4e4be
|
@ -1,5 +1,8 @@
|
|||
2009-12-10 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-list.el (org-previous-item): Exit at the beginning of the
|
||||
buffer.
|
||||
|
||||
* org-id.el (org-id-locations-save): Only write the id locations
|
||||
if any are defined.
|
||||
|
||||
|
|
|
@ -616,7 +616,8 @@ Error if not at a plain list, or if this is the first item in the list."
|
|||
(if (looking-at "[ \t]*$")
|
||||
nil
|
||||
(if (<= (setq ind1 (org-get-indentation)) ind)
|
||||
(throw 'exit t)))))
|
||||
(throw 'exit t)))
|
||||
(if (bobp) (throw 'exit t))))
|
||||
(condition-case nil
|
||||
(if (or (not (org-at-item-p))
|
||||
(< ind1 (1- ind)))
|
||||
|
|
Loading…
Reference in New Issue