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
|
indent unconditionally; otherwise, call `newline' with ARG and
|
||||||
INTERACTIVE, which can trigger indentation if
|
INTERACTIVE, which can trigger indentation if
|
||||||
`electric-indent-mode' is enabled."
|
`electric-indent-mode' is enabled."
|
||||||
|
(when interactive
|
||||||
|
(org-fold-check-before-invisible-edit 'insert))
|
||||||
(if indent
|
(if indent
|
||||||
(org-newline-and-indent arg)
|
(org-newline-and-indent arg)
|
||||||
(newline arg interactive)))
|
(newline arg interactive)))
|
||||||
|
|
Loading…
Reference in New Issue