From 40f32fb82a29d3f057e195305a7d416241f2fc53 Mon Sep 17 00:00:00 2001 From: H Durer Date: Fri, 30 Mar 2018 05:12:48 +0100 Subject: Fixes to boosting/favoriting. (#194) I had issues that occasionally I couldn't unfavorite / unboost a toot. Once that was fixed it annoyed me that the cursor would often jump on those actions (jumping to the byline with no need). --- lisp/mastodon-tl.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 61a0f1e..4d8df7e 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -714,7 +714,7 @@ it is `mastodon-tl--byline-boosted'" Move forward (down) the timeline unless BACKWARD is non-nil." (or (get-text-property (point) prop) - (progn + (save-excursion (if backward (mastodon-tl--goto-prev-toot) (mastodon-tl--goto-next-toot)) @@ -722,13 +722,15 @@ Move forward (down) the timeline unless BACKWARD is non-nil." (defun mastodon-tl--newest-id () "Return toot-id from the top of the buffer." - (goto-char (point-min)) - (mastodon-tl--property 'toot-id)) + (save-excursion + (goto-char (point-min)) + (mastodon-tl--property 'toot-id))) (defun mastodon-tl--oldest-id () "Return toot-id from the bottom of the buffer." - (goto-char (point-max)) - (mastodon-tl--property 'toot-id t)) + (save-excursion + (goto-char (point-max)) + (mastodon-tl--property 'toot-id t))) (defun mastodon-tl--as-string(numeric) "Convert NUMERIC to string." -- cgit v1.2.3