Skip to content

Commit

Permalink
Fix `twittering-render-timeline' to keep the marker at the end.
Browse files Browse the repository at this point in the history
* twittering-mode.el (twittering-render-timeline): use `insert'
when inserting a status at the end of the buffer in order to keep
the marker pointing the end of the buffer.
  • Loading branch information
cvmat committed Feb 9, 2010
1 parent 4841e56 commit 6908a9f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Expand Up @@ -6,6 +6,10 @@
additional statuses if the function is called at the end of the
buffer.

* twittering-mode.el (twittering-render-timeline): use `insert'
when inserting a status at the end of the buffer in order to keep
the marker pointing the end of the buffer.

2010-02-08 Satoshi Yatagawa <yata_github@y.hauN.org>

* twittering-mode.el (twittering-http-default-sentinel): Delete a
Expand Down
11 changes: 8 additions & 3 deletions twittering-mode.el
Expand Up @@ -1945,9 +1945,14 @@ If ID of STATUS-DATUM is already in ID-TABLE, return nil. If not, return t."
status twittering-status-format))
(separator "\n"))
(goto-char pos)
;; Use `insert-before-markers' in order to keep
;; which status is pointed by each marker.
(insert-before-markers formatted-status separator)
(cond
((eq pos (point-max))
;; Insert a status after the current position.
(insert formatted-status separator))
(t
;; Use `insert-before-markers' in order to keep
;; which status is pointed by each marker.
(insert-before-markers formatted-status separator)))
;; Now, `pos' points the head of the status.
;; It must be moved to the current point
;; in order to skip the status inserted just now.
Expand Down

0 comments on commit 6908a9f

Please sign in to comment.