浏览代码

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.
Carsten Dominik 14 年之前
父节点
当前提交
9e5ab4053e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/org-table.el

+ 2 - 1
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) ""))