org-log-beginning: Fix extra blank line created after LOGBOOK drawer

* lisp/org.el (org-log-beginning): Fix regression after f63ff07441
when additional blank is created after newly added LOGBOOK drawer.

Reported-by: Kris Nelson <kris@kristofernelson.com>
Link: https://orgmode.org/list/766237934.317726.1715720181047@office.mailbox.org
This commit is contained in:
Ihor Radchenko 2024-05-17 14:19:29 +03:00
parent ea8ed59c02
commit 288c7069c4
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 1 deletions

View File

@ -10668,7 +10668,8 @@ narrowing."
(org-fold-core-ignore-modifications
(unless (bolp) (insert-and-inherit "\n"))
(let ((beg (point)))
(insert-and-inherit ":" drawer ":\n:END:\n")
(insert-and-inherit ":" drawer ":\n:END:")
(if (eolp) (forward-char) (insert "\n"))
(org-indent-region beg (point))
(org-fold-region (line-end-position -1) (1- (point)) t 'drawer))))
(end-of-line -1))))