* Emacs 21 bug scrolling image horizontally to right in other window
@ 2003-02-04 1:14 Greg Hill
0 siblings, 0 replies; only message in thread
From: Greg Hill @ 2003-02-04 1:14 UTC (permalink / raw)
When scrolling a window to the right in an "other-window", if the
window being scrolled contains an image, under certain circumstances
the rightmost character-width's worth of the image gets duplicated.
To see this happen, use the showImage routine below (referencing some
image file you have) to display an image. Use the scroll-image-left
routine to scroll it to the left. Then, with some window selected
other than the one displaying the showImage buffer, use the
scroll-image-right routine to scroll the image to the right, and
notice what happens to its right-hand edge.
Then choose the window displaying the image as the selected window,
and use the same scrolling routines. Notice that the problem goes
away.
Next, uncomment out the first (insert "\n") in showImage, and repeat
the original experiment. Notice that the problem goes away.
Finally, leave the initial (insert "\n") not commented out, change
the 1 in the call to goto-char to a 2, and notice that the problem
comes back.
(defun showImage ()
(interactive)
(save-selected-window
(switch-to-buffer-other-window "showImage")
(erase-buffer)
;;; (insert "\n")
(insert-image (create-image "rms.jpeg") (point))
(insert "\n")
(goto-char 1) ))
(defun scroll-image-left ()
(interactive)
(save-selected-window
(select-window (get-buffer-window "showImage"))
(scroll-left 1)))
(defun scroll-image-right ()
(interactive)
(save-selected-window
(select-window (get-buffer-window "showImage"))
(scroll-right 1)))
(global-set-key [M-left] 'scroll-image-left)
(global-set-key [M-right] 'scroll-image-right)
--Greg
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-04 1:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-04 1:14 Emacs 21 bug scrolling image horizontally to right in other window Greg Hill
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).