branch: externals/ement
commit 36677f4cf6e155dfb7ced187cf7aba59d912ba1e
Merge: c217fe49f1 76e90dc418
Author: Adam Porter <a...@alphapapa.net>
Commit: Adam Porter <a...@alphapapa.net>

    Change: (ement-room-image-show) Enable image-mode
    
    Closes #164.
---
 README.org    | 1 +
 ement-room.el | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 0e628decae..b48936c226 100644
--- a/README.org
+++ b/README.org
@@ -304,6 +304,7 @@ Note that, while ~matrix-client~ remains usable, and 
probably will for some time
 + Command ~ement-room-image-show-mouse~ is used to show an image with the 
mouse.
 
 *Changes*
++ Enable ~image-mode~ when showing images in a new buffer.  (Thanks to 
[[https://github.com/Stebalien][Steven Allen]].)
 + Command ~ement-room-image-show~ is not used for mouse events.
 + Show useful message in SSO login page.
 
diff --git a/ement-room.el b/ement-room.el
index f8a0647a1d..eb8f2c5f4f 100644
--- a/ement-room.el
+++ b/ement-room.el
@@ -4050,7 +4050,8 @@ height."
           (image-property image :max-height) nil)
     (with-current-buffer new-buffer
       (erase-buffer)
-      (insert-image image))
+      (insert-image image)
+      (image-mode))
     (pop-to-buffer new-buffer '((display-buffer-pop-up-frame)))
     (set-frame-parameter nil 'fullscreen 'maximized)))
 

Reply via email to