summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-09-15 18:11:32 +0800
committerJSDurand <mmemmew@gmail.com>2021-09-15 18:11:32 +0800
commit7fdec0d1e631383d24ef6f188986b28cf1c7c9d9 (patch)
tree72c0ea05723495a0ffe430a1e398a3b3c96bee1d
parentc9999239c119970dcc07517dfe075444e5ead74b (diff)
eww bookmark: fix position jumping
* eww-conf.el (durand-eww-bookmark-jump): I forgot to give the bookmark handler the saved position, so it might jump to weird positions. Now this is fixed.
-rw-r--r--eww-conf.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/eww-conf.el b/eww-conf.el
index 86b2cd8..ad6cbfd 100644
--- a/eww-conf.el
+++ b/eww-conf.el
@@ -439,6 +439,7 @@ Otherwise, fetch URL and afterwards try to restore the point."
(bookmark-get-front-context-string bookmark)))
(rear (cons 'rear-context-string
(bookmark-get-rear-context-string bookmark)))
+ (position (cons 'position (bookmark-get-position bookmark)))
(eww-buffers
(delq
nil
@@ -522,10 +523,12 @@ Otherwise, fetch URL and afterwards try to restore the point."
"Restore the point after render."
(remove-hook
'eww-after-render-hook
- #'durand-eww-bookmark-restore-point-hook)
+ #'durand-eww-bookmark-restore-point-hook
+ t)
(bookmark-default-handler
(list
- "" (cons 'buffer buffer) front rear)))))))))))
+ "" (cons 'buffer buffer) front rear)))
+ nil t))))))))
((user-error "Cannot jump to this bookmark")))))
(provide 'eww-conf)