Browse Source

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 years ago
parent
commit
a76ebd2bb2
1 changed files with 2 additions and 1 deletions
  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)))