aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authorH Durer <h.duerer@gmail.com>2018-03-30 05:12:48 +0100
committerJohnson Denen <johnson.denen@gmail.com>2018-08-10 22:20:04 -0400
commit40f32fb82a29d3f057e195305a7d416241f2fc53 (patch)
tree282cbd029a8c53d66c8d29c4d4cd83629620254a /lisp/mastodon-tl.el
parentdd4752a8e04d5ecb0828318ea86aeb564ce702a3 (diff)
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).
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el12
1 files changed, 7 insertions, 5 deletions
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."