summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-20 23:03:18 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-20 23:03:18 +0200
commit1d2f52f4875a2aa82bad27f1f0a52e4dc6eddce1 (patch)
treef086f93b1090cab01c2d6b29dff44d34dc96f113
parent920cfbd921c3828d8696a4fc8728c4e03172894a (diff)
downloadorg-mode-1d2f52f4875a2aa82bad27f1f0a52e4dc6eddce1.tar.gz
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>
-rw-r--r--lisp/org-table.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 4fef299..8b0642f 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -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