]> git.eshelyaron.com Git - emacs.git/commitdiff
Keep vc-print-log from putting point at buffer end (Bug#31764)
authorNoam Postavsky <npostavs@gmail.com>
Tue, 12 Jun 2018 00:00:54 +0000 (20:00 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 14 Jun 2018 23:17:20 +0000 (19:17 -0400)
* lisp/vc/vc.el (vc-print-log-internal): Use `save-excursion' around
`vc-print-log-setup-buttons'.

lisp/vc/vc.el

index 93e9c25cbfd6382a59e5c535e573533d180bb058..41a76e0007ecc718bf421333da684f1c9e67af97 100644 (file)
@@ -2256,8 +2256,9 @@ earlier revisions.  Show up to LIMIT entries (non-nil means unlimited)."
         (vc-call-backend bk 'print-log files-arg buf shortlog
                           (when is-start-revision working-revision) limit))
        (lambda (_bk _files-arg ret)
-        (vc-print-log-setup-buttons working-revision
-                                    is-start-revision limit ret))
+         (save-excursion
+           (vc-print-log-setup-buttons working-revision
+                                       is-start-revision limit ret)))
        ;; When it's nil, point really shouldn't move (bug#15322).
        (when working-revision
          (lambda (bk)