Browse Source

org-clock.el (org-clock-put-overlay): Fix display when `org-indent-mode' is on

* org-clock.el (org-clock-put-overlay): Fix display when
`org-indent-mode' is on.

Thanks to Christoph Groth for reporting this.
Bastien Guerry 11 years ago
parent
commit
17fb85b12c
1 changed files with 5 additions and 4 deletions
  1. 5 4
      lisp/org-clock.el

+ 5 - 4
lisp/org-clock.el

@@ -1852,14 +1852,15 @@ This creates a new overlay and stores it in `org-clock-overlays', so that it
 will be easy to remove."
   (let* ((c 60) (h (floor (/ time 60))) (m (- time (* 60 h)))
 	 (l (if level (org-get-valid-level level 0) 0))
-	 (off 0)
 	 ov tx)
     (org-move-to-column c)
     (unless (eolp) (skip-chars-backward "^ \t"))
     (skip-chars-backward " \t")
-    (setq ov (make-overlay (point-at-bol) (point-at-eol))
-    	  tx (concat (buffer-substring (point-at-bol) (point))
-		     (make-string (+ off (max 0 (- c (current-column)))) ?.)
+    (setq ov (make-overlay (1- (point-at-eol)) (point-at-eol))
+    	  tx (concat (buffer-substring (1- (point)) (point))
+		     (make-string
+		      (max 0 (- (- c (current-column))
+				(length (org-get-at-bol 'line-prefix)))) ?.)
 		     (org-add-props (concat (make-string l ?*) " "
 					    (org-minutes-to-clocksum-string time)
 					    (make-string (- 16 l) ?\ ))