org-self-insert-command: Do not trigger folding checks

* lisp/org.el (org-self-insert-command): Do not trigger folding checks
for interactive edits.
This commit is contained in:
Ihor Radchenko 2023-03-15 15:18:23 +01:00
parent 0e7b5626ef
commit 635a601dd5
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 5 additions and 3 deletions

View File

@ -16489,7 +16489,8 @@ overwritten, and the table is not marked as requiring realignment."
t)
(looking-at "[^|\n]* |"))
;; There is room for insertion without re-aligning the table.
(self-insert-command N)
(org-fold-core-ignore-modifications
(self-insert-command N))
(org-table-with-shrunk-field
(save-excursion
(skip-chars-forward "^|")
@ -16499,8 +16500,9 @@ overwritten, and the table is not marked as requiring realignment."
(delete-region (- (point) 2) (1- (point))))))
(t
(setq org-table-may-need-update t)
(self-insert-command N)
(org-fix-tags-on-the-fly)
(org-fold-core-ignore-modifications
(self-insert-command N)
(org-fix-tags-on-the-fly))
(when org-self-insert-cluster-for-undo
(if (not (eq last-command 'org-self-insert-command))
(setq org-self-insert-command-undo-counter 1)