org-table-header-line-mode: Fix when cursor is outside table
* lisp/org-table.el (org-table-header-set-header): Display table header even when the point is below the table, as long as the table is visible at the top of the window.
This commit is contained in:
parent
096ecc9e24
commit
5128460f94
|
@ -487,6 +487,11 @@ This may be useful when columns have been shrunk."
|
||||||
(delete-overlay org-table-header-overlay))
|
(delete-overlay org-table-header-overlay))
|
||||||
(let* ((ws (window-start))
|
(let* ((ws (window-start))
|
||||||
(beg (save-excursion
|
(beg (save-excursion
|
||||||
|
;; Check table at window start, not at point.
|
||||||
|
;; Point might be after the table, or at
|
||||||
|
;; another table located below the one visible
|
||||||
|
;; on top.
|
||||||
|
(goto-char ws)
|
||||||
(goto-char (org-table-begin))
|
(goto-char (org-table-begin))
|
||||||
(while (or (org-at-table-hline-p)
|
(while (or (org-at-table-hline-p)
|
||||||
(looking-at-p ".*|\\s-+<[rcl]?\\([0-9]+\\)?>"))
|
(looking-at-p ".*|\\s-+<[rcl]?\\([0-9]+\\)?>"))
|
||||||
|
|
Loading…
Reference in New Issue