File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 4848(declare-function markdown-link-at-pos " ext:markdown-mode" (pos))
4949(declare-function markdown-follow-link-at-point " ext:markdown-mode" )
5050
51+ ; ;; User variables
52+
53+ (defcustom jupyter-image-max-width 0
54+ " Maximum width of images in REPL.
55+ Wider images are resized. Special value 0 means no limit."
56+ :type 'integer
57+ :group 'jupyter-repl )
58+
59+ ; ;; Implementation
60+
5161(defvar-local jupyter-display-ids nil
5262 " A hash table of display IDs.
5363Display IDs are implemented by setting the text property,
@@ -480,6 +490,8 @@ width and height of the image."
480490 metadata
481491 (let ((img (create-image
482492 data type 'data :width width :height height
493+ :max-width (when (> jupyter-image-max-width 0 )
494+ jupyter-image-max-width)
483495 :mask (when needs_background
484496 '(heuristic t )))))
485497 (insert-image img))))
You can’t perform that action at this time.
0 commit comments