From f5999517e2f937d11a3aeccca749ed87d193f24c Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Thu, 7 Dec 2023 09:49:14 -0500 Subject: [PATCH] Improve invisible point detection --- global.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/global.org b/global.org index ce8cabf..7757801 100644 --- a/global.org +++ b/global.org @@ -1032,7 +1032,8 @@ #+begin_src emacs-lisp (defun org-smart-line-beginning () (interactive) - (when (invisible-p (point)) + (when (or (invisible-p (point)) + (invisible-p (- (point) 1))) ;; assume that we are in a folded headline; move back to heading ;; otherwise we will be trapped in the invisible region (org-back-to-heading))