org-table.el: Do not create new field when at EOL after table line

* lisp/org-table.el (org-table-justify-field-maybe): Do not treat "|$"
as unclosed table field.

Fixes https://orgmode.org/list/trinity-2561db57-1561-470b-982f-0d91ddf4f145-1629900012884@3c-app-mailcom-lxa06
This commit is contained in:
Ihor Radchenko 2021-10-02 14:44:30 +08:00
parent dd173bf451
commit b5f992b678
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -4437,7 +4437,7 @@ Optional argument NEW may specify text to replace the current field content."
(col (org-table-current-column)))
(when (> col 0)
(skip-chars-backward "^|")
(if (not (looking-at " *\\([^|\n]*?\\) *\\(|\\|$\\)"))
(if (not (looking-at " *\\(?:\\([^|\n]*?\\) *\\(|\\)\\|\\([^|\n]+?\\) *\\($\\)\\)"))
(setq org-table-may-need-update t)
(let* ((align (nth (1- col) org-table-last-alignment))
(width (nth (1- col) org-table-last-column-widths))