summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-17 18:16:22 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-17 18:16:22 +0200
commit91c68865c644277772028faca96b7ff03541e7cf (patch)
tree1d8754c6a7a646366306ecc710726376b2cd9437
parent731f59f96530d107db7bd1b5ac35c5accf255e4a (diff)
downloadorg-mode-91c68865c644277772028faca96b7ff03541e7cf.tar.gz
Fix deleting region in a table
* lisp/org.el (org-self-insert-command): Fix deleting region in a table. Reported-by: Nick Helm <nick@tenpoint.co.nz> <http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00346.html>
-rw-r--r--lisp/org.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 28fe14a..85c1a4b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20122,6 +20122,8 @@ overwritten, and the table is not marked as requiring realignment."
(call-interactively 'org-self-insert-command)))))
((and
(org-at-table-p)
+ (eq N 1)
+ (not (org-region-active-p))
(progn
;; Check if we blank the field, and if that triggers align.
(and (featurep 'org-table) org-table-auto-blank-field
@@ -20135,7 +20137,6 @@ overwritten, and the table is not marked as requiring realignment."
;; width.
(org-table-blank-field)))
t)
- (eq N 1)
(looking-at "[^|\n]* \\( \\)|"))
;; There is room for insertion without re-aligning the table.
(delete-region (match-beginning 1) (match-end 1))