diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-09-05 18:50:03 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-09-05 18:50:03 +0200 |
commit | c475cc288610375063896aa91668cb8a0c297199 (patch) | |
tree | 7bd38e102cc8355e35c93564e12bf6ff6127b64a | |
parent | f1269e4c14695a2edf8dafcfd3e0b0bfe810c203 (diff) | |
download | org-mode-c475cc288610375063896aa91668cb8a0c297199.tar.gz |
org-table: Fix thinko
* lisp/org-table.el (org-table-line-to-dline): Do not assume dichotomy
failed.
Reported-by: Lem Ming <ramboman777@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-09/msg00035.html>
-rw-r--r-- | lisp/org-table.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index 6cec763..8eb38ef 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1429,7 +1429,7 @@ non-nil, the one above is used." (cond ((or (> (aref org-table-dlines min) line) (< (aref org-table-dlines max) line)) nil) - ((= (aref org-table-dlines max) line) max) + ((= line (aref org-table-dlines max)) max) (t (catch 'exit (while (> (- max min) 1) (let* ((mean (/ (+ max min) 2)) @@ -1437,7 +1437,10 @@ non-nil, the one above is used." (cond ((= v line) (throw 'exit mean)) ((> v line) (setq max mean)) (t (setq min mean))))) - (if above min max)))))) + (cond ((= line (aref org-table-dlines max)) max) + ((= line (aref org-table-dlines min)) min) + (above min) + (t max))))))) ;;;###autoload (defun org-table-delete-column () |