Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix the behavior of `twittering-replied-statuses-visible-p'.
* twittering-mode.el: Fix the behavior of the function
`twittering-replied-statuses-visible-p' on a header or a footer.
(twittering-replied-statuses-visible-p): return nil on a header or
a footer.
  • Loading branch information
cvmat committed Mar 17, 2012
1 parent 80ee3a2 commit 7a07459
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Expand Up @@ -70,6 +70,11 @@
(twittering-hide-replied-statuses): determine a region being
deleted by using the new functions.

* twittering-mode.el: Fix the behavior of the function
`twittering-replied-statuses-visible-p' on a header or a footer.
(twittering-replied-statuses-visible-p): return nil on a header or
a footer.

2012-03-04 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Fix the escape of a query string in a search
Expand Down
18 changes: 10 additions & 8 deletions twittering-mode.el
Expand Up @@ -7974,14 +7974,16 @@ Otherwise, return nil."
(id (twittering-get-id-at pos))
(prev (twittering-get-previous-status-head pos))
(next (twittering-get-next-status-head pos)))
(or
(twittering-get-base-id-of-ancestor-at pos)
(and prev
(twittering-status-id=
id (twittering-get-base-id-of-ancestor-at prev)))
(and next
(twittering-status-id=
id (twittering-get-base-id-of-ancestor-at next))))))
(when id
;; If ID is nil, it means that no normal tweets are rendered at POS.
(or
(twittering-get-base-id-of-ancestor-at pos)
(and prev
(twittering-status-id=
id (twittering-get-base-id-of-ancestor-at prev)))
(and next
(twittering-status-id=
id (twittering-get-base-id-of-ancestor-at next)))))))

(defun twittering-get-beginning-of-visible-replied-statuses (&optional pos)
"Return the beginning position of visible replied statuses at POS.
Expand Down

0 comments on commit 7a07459

Please sign in to comment.