1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

org-table: Fix incorrect input when used with evil-escape

* org-table.el (org-self-insert-command): Use `last-command-event'
instead of `last-input-event'.  Using `last-input-event' causes
problems in the presence of `evil-escape'.  Consider a buffer that has
`orgtbl-mode' enabled while evil-escape is in use.  Assume the
evil-escape sequence is "fd".  Typing "f RET" will instead insert "RET
RET" into the buffer, since `last-input-event' is "RET", but
`last-command-event' is "f".

TINYCHANGE
This commit is contained in:
Aaron L. Zeng 2023-04-03 13:53:57 -04:00 committed by Ihor Radchenko
parent 54a743cd72
commit 19b0d0e5aa
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -5416,8 +5416,8 @@ overwritten, and the table is not marked as requiring realignment."
(let* (orgtbl-mode
(cmd (or (key-binding
(or (and (listp function-key-map)
(cdr (assoc last-input-event function-key-map)))
(vector last-input-event)))
(cdr (assoc last-command-event function-key-map)))
(vector last-command-event)))
'self-insert-command)))
(call-interactively cmd)
(if (and org-self-insert-cluster-for-undo