소스 검색

org-colview.el: Possibly take linum-offset into account

* lisp/org-colview.el (org-columns--display-here-title):
Possibly take linum-offset into account.

Thanks to Eric S Fraga for reporting this.
Bastien 7 년 전
부모
커밋
8cdefed80b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lisp/org-colview.el

+ 2 - 1
lisp/org-colview.el

@@ -448,6 +448,7 @@ for the duration of the command.")
   "Overlay the newline before the current line with the table title."
   "Overlay the newline before the current line with the table title."
   (interactive)
   (interactive)
   (let ((title "")
   (let ((title "")
+	(linum-offset (line-number-display-width 'columns))
 	(i 0))
 	(i 0))
     (dolist (column org-columns-current-fmt-compiled)
     (dolist (column org-columns-current-fmt-compiled)
       (pcase column
       (pcase column
@@ -459,7 +460,7 @@ for the duration of the command.")
     (setq-local org-previous-header-line-format header-line-format)
     (setq-local org-previous-header-line-format header-line-format)
     (setq org-columns-full-header-line-format
     (setq org-columns-full-header-line-format
 	  (concat
 	  (concat
-	   (org-add-props " " nil 'display '(space :align-to 0))
+	   (org-add-props " " nil 'display `(space :align-to ,linum-offset))
 	   (org-add-props (substring title 0 -1) nil 'face 'org-column-title)))
 	   (org-add-props (substring title 0 -1) nil 'face 'org-column-title)))
     (setq org-columns-previous-hscroll -1)
     (setq org-columns-previous-hscroll -1)
     (add-hook 'post-command-hook 'org-columns-hscroll-title nil 'local)))
     (add-hook 'post-command-hook 'org-columns-hscroll-title nil 'local)))