Guard direct headline editing also at beginning of line

Had missed that case up to now.
This commit is contained in:
Daniel Borchmann 2025-05-08 20:04:00 +02:00
parent 70cf684efa
commit 53313ab3dc
No known key found for this signature in database
GPG Key ID: 50EA937BF472ADD1

View File

@ -1255,9 +1255,10 @@ ignored.
The implementat has been adapted from `org-speed-command-activate' to The implementat has been adapted from `org-speed-command-activate' to
ignore all keys pressed at the beginning of a headline." ignore all keys pressed at the beginning of a headline."
(ignore keys) (ignore keys)
(when (and (or (looking-at "\\*") (when (or (looking-at "^\\*") ; bol with * as first entry
(and (or (looking-at "\\*") ; at the start of a headline, but not at bol
(looking-at " ")) (looking-at " "))
(looking-back "^\\*+ ?" nil)) (looking-back "^\\*+ ?" nil)))
#'(lambda () #'(lambda ()
(user-error "No direct input allowed in headline")))) (user-error "No direct input allowed in headline"))))