Source

text-modes / xpm-mode.el

Diff from to

xpm-mode.el

       (picture-mode))
   (if (featurep 'toolbar)
       (progn
-	(set-specifier left-toolbar-width (cons (selected-frame) 16))
+	;; Use `current-buffer', not `selected-frame', here.
+	;; Fixes bug where switching to another buffer causes its
+	;; full-width left toolbar to be truncated to the xpm-mode
+	;; palette (16 pixels).  Causes "window bounce" if sharing a
+	;; frame with a window displaying a buffer with a full-width
+	;; toolbar (suggested workaround: don't reset toolbar width
+	;; for palette).
+	(set-specifier left-toolbar-width (cons (current-buffer) 16))
 	(set-specifier left-toolbar (cons (current-buffer) xpm-palette))))
   (message "Parsing body...")
   (xpm-color-data)