mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-27 10:54:40 +00:00
Avoid point movement when visiting image files
* lisp/image-mode.el (image-toggle-display-image): Preserve point around the call to exif-parse-buffer, to prevent it from moving into the image data. (Bug#46552)
This commit is contained in:
parent
da64a257a4
commit
c977370dd7
@ -829,7 +829,9 @@ was inserted."
|
||||
(setq image-transform-rotation
|
||||
(or (exif-orientation
|
||||
(ignore-error exif-error
|
||||
(exif-parse-buffer)))
|
||||
;; exif-parse-buffer can move point, so preserve it.
|
||||
(save-excursion
|
||||
(exif-parse-buffer))))
|
||||
0.0)))
|
||||
;; Swap width and height when changing orientation
|
||||
;; between portrait and landscape.
|
||||
|
Loading…
Reference in New Issue
Block a user