diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2011-05-26 08:39:46 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2011-05-26 08:39:46 +0200 |
commit | 9e5ab4053edd44c012b419b83482f334409a9fc6 (patch) | |
tree | f222806ceb1d893980b2ce8e8b3436a2c83a3a1b | |
parent | 9f81e43973c1b7cde486db0d43d825c3f15c7f28 (diff) | |
download | org-mode-9e5ab4053edd44c012b419b83482f334409a9fc6.tar.gz |
Avoid changing field positions with `org-table-get-field'
* lisp/org-table.el (org-table-get-field): Make sure the new field
content is at least one space character.
-rw-r--r-- | lisp/org-table.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index 0f71d57..30c4ddd 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1141,7 +1141,8 @@ is always the old value." (let* ((pos (match-beginning 0)) (val (buffer-substring (1+ pos) (match-end 0)))) (if replace - (replace-match (concat "|" replace) t t)) + (replace-match (concat "|" (if (equal replace "") " " replace)) + t t)) (goto-char (min (point-at-eol) (+ 2 pos))) val) (forward-char 1) "")) |