Stop before headline when going to previous timeline line

This commit is contained in:
Daniel - 2022-03-31 12:41:39 +02:00
parent ff0ea07f53
commit 8068107326
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 5 additions and 1 deletions

View File

@ -546,7 +546,11 @@ current values of the relevant buffer local variables."
(user-error "Not in Timeline buffer"))
(beginning-of-line)
(let ((point (point)))
(unless (re-search-backward "^| " nil 'no-error)
;; Make sure we do not move into the headline by checking the `entry'
;; property
(unless (and (re-search-backward "^| " nil 'no-error)
(progn (org-table-next-field)
(get-text-property (point) 'entry)))
(goto-char point)
(user-error "No previous line"))
(beginning-of-line)))