瀏覽代碼

Fix bug with tags filtering.

So far, we had mad invisible the line including the \n after it.
This is a bad idea.  When the cursor is at the beginning of the
line that is preceded by an invisible line, the local text
properties are actually those of the invisible line
just before the current.

Now we make invisible the line together with the \n *before* it,
this should fix things all right.
Carsten Dominik 17 年之前
父節點
當前提交
a76ebd2bb2
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/org-agenda.el

+ 2 - 1
lisp/org-agenda.el

@@ -4126,7 +4126,8 @@ With prefix argument STRIP, remove all lines that do have the tag."
 
 (defun org-agenda-filter-by-tag-hide-line ()
   (let (ov)
-    (setq ov (org-make-overlay (point-at-bol) (1+ (point-at-eol))))
+    (setq ov (org-make-overlay (max (point-min) (1- (point-at-bol)))
+			       (point-at-eol)))
     (org-overlay-put ov 'invisible t)
     (org-overlay-put ov 'type 'tags-filter)
     (push ov org-agenda-filter-overlays)))