org-table: Fix orgtbl-self-insert-command on white spaces

* lisp/org-table.el (orgtbl-self-insert-command): Properly overwrite
  white spaces when there is room for it.  This is on par with what
  `org-self-insert-command' does in Org tables.

Reported-by: Alex <agrambot@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107112>
This commit is contained in:
Nicolas Goaziou 2016-05-20 23:03:18 +02:00
parent 920cfbd921
commit 1d2f52f487
1 changed files with 2 additions and 4 deletions

View File

@ -4571,11 +4571,9 @@ overwritten, and the table is not marked as requiring realignment."
(org-table-blank-field))
t)
(eq N 1)
(looking-at "[^|\n]* +|"))
(looking-at "[^|\n]* \\( \\)|"))
(let (org-table-may-need-update)
(goto-char (1- (match-end 0)))
(org-delete-backward-char 1)
(goto-char (match-beginning 0))
(delete-region (match-beginning 1) (match-end 1))
(self-insert-command N))
(setq org-table-may-need-update t)
(let* (orgtbl-mode