From 16726abaa9f006b8826dd5c0e1630b39859c996f Mon Sep 17 00:00:00 2001 From: Alexander Griffith Date: Mon, 24 Apr 2017 00:31:02 -0400 Subject: Fixed #65 pointer placement when getting more toots --- lisp/mastodon-tl.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 691f83d..0fced8c 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -224,14 +224,17 @@ Move forward (down) the timeline unless BACKWARD is non-nil." (defun mastodon-tl--more () "Append older toots to timeline." (interactive) - (let* ((tl (mastodon-tl--timeline-name)) + (let* ((point-before-update (point)) + (tl (mastodon-tl--timeline-name)) (id (mastodon-tl--oldest-id)) (json (mastodon-tl--more-json tl id))) (when json (with-current-buffer (current-buffer) (let ((inhibit-read-only t)) (goto-char (point-max)) - (mastodon-tl--timeline json)))))) + (mastodon-tl--timeline json) + (goto-char point-before-update) + (mastodon-tl--goto-next-toot)))))) (defun mastodon-tl--update () "Update timeline with new toots." -- cgit v1.2.3