org-return: Do not insert inside folded region
* lisp/org.el (org--newline): When called interactively, check for invisible edits. Reported-by: Kaiyu Zheng <kaiyu_zheng@alumni.brown.edu> Link: https://orgmode.org/list/87wmxs8hxt.fsf@localhost
This commit is contained in:
parent
27a41d418d
commit
a25d00d5df
|
@ -17663,6 +17663,8 @@ If INDENT is non-nil, call `newline-and-indent' with ARG to
|
|||
indent unconditionally; otherwise, call `newline' with ARG and
|
||||
INTERACTIVE, which can trigger indentation if
|
||||
`electric-indent-mode' is enabled."
|
||||
(when interactive
|
||||
(org-fold-check-before-invisible-edit 'insert))
|
||||
(if indent
|
||||
(org-newline-and-indent arg)
|
||||
(newline arg interactive)))
|
||||
|
|
Loading…
Reference in New Issue