summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Dokos <ndokos@redhat.com>2014-07-22 17:11:36 -0400
committerNick Dokos <ndokos@gmail.com>2014-07-23 23:57:06 -0400
commitc9613c0cad40c9d901609abcb8e9527c85cb9eb3 (patch)
tree768c0bfcadc42ec045dd6b43b2a483886df226a9
parentd0959d410bbc20d57aa4cb6c8ac5219f1b555d45 (diff)
downloadorg-mode-c9613c0cad40c9d901609abcb8e9527c85cb9eb3.tar.gz
When editing a table formula, point is not necessarily on its referent.
* org-table.el (org-table-show-reference): Call `set-window-start' with the calculated values `min' and `max', not with (point-min) and (point-max). Reported by Luke Crook (http://article.gmane.org/gmane.emacs.orgmode/88610) Thorsten Grothe (http://thread.gmane.org/gmane.emacs.orgmode/88698) and Robert Klein in the latter thread. Robert Klein bisected it down to 30220ffcdcef45c0237f80a2347d4da19877f64a.
-rw-r--r--lisp/org-table.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index bfe396e..f19c027 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -3859,10 +3859,10 @@ With prefix ARG, apply the new formulas to the table."
(push org-table-current-begin-pos org-show-positions)
(let ((min (apply 'min org-show-positions))
(max (apply 'max org-show-positions)))
- (set-window-start (selected-window) (point-min))
+ (set-window-start (selected-window) min)
(goto-char max)
(or (pos-visible-in-window-p max)
- (set-window-start (selected-window) (point-max)))))
+ (set-window-start (selected-window) max))))
(select-window win))))
(defun org-table-force-dataline ()