1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-30 08:08:26 +00:00

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 30220ffcdc.
This commit is contained in:
Nick Dokos 2014-07-22 17:11:36 -04:00 committed by Nick Dokos
parent d0959d410b
commit c9613c0cad

View File

@ -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 ()