diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-07-01 09:57:45 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-07-01 10:18:17 +0200 |
commit | 40e03973f3bfa0a010b943274918418e108a82bb (patch) | |
tree | 4193f1a63c73f04df590cca8dff9ff3bd66d29d1 | |
parent | 4ea393e562bc9ca71eddc7314922eac475f5d2fb (diff) | |
download | org-mode-40e03973f3bfa0a010b943274918418e108a82bb.tar.gz |
org-table: Fix checks for impossible row moves
* lisp/org-table.el (org-table-move-row): Fix checks.
-rw-r--r-- | lisp/org-table.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index 0a48602..4b7f604 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1533,8 +1533,10 @@ non-nil, the one above is used." (dline2 (+ dline1 (if up -1 1))) (tonew (if up 0 2)) txt hline2p) + (when (and up (= (point-min) (line-beginning-position))) + (user-error "Cannot move row further")) (beginning-of-line tonew) - (unless (org-at-table-p) + (when (or (and (not up) (eobp)) (not (org-at-table-p))) (goto-char pos) (user-error "Cannot move row further")) (setq hline2p (looking-at org-table-hline-regexp)) |