all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: 14881@debbugs.gnu.org
Subject: bug#14881: 24.3.50; Odd cursor movement with images (or lines with different heights?)
Date: Tue, 16 Jul 2013 21:29:26 +0300	[thread overview]
Message-ID: <83hafu2wah.fsf@gnu.org> (raw)
In-Reply-To: <m3ehayo0aj.fsf@stories.gnus.org>

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 16 Jul 2013 19:57:24 +0200
> 
> I've seen some increasingly odd cursor movements the last few weeks if I
> have images in a buffer.  To reproduce, have a frame that's 800 pixels
> high.  Eval the following:
> 
> (url-retrieve "http://quimby.gnus.org/circus/jukebox.php?image=micro.png&group=Phill%20Niblock&album=Touch%20Food%20%281%29"
> 	      (lambda (&rest args)
> 		(search-forward "\n\n")
> 		(let ((image (create-image
> 			      (buffer-substring (point) (point-max))
> 			      nil t)))
> 		  (pop-to-buffer "*test*")
> 		  (erase-buffer)
> 		  (dotimes (i 100)
> 		    (insert-image image "*")
> 		    (insert (format " foo %d\n" i))))))
> 
> Go to the first line in the buffer and hit `C-n'.  Instead of moving the
> cursor to the next line, the buffer is shifted one line up instead.

It is not supposed to move to the next line, it is supposed to vscroll
by the number of pixels that is the height of the default face's font
(16 pixels on my system, YMMV).  That is what line-move-visual option
does when auto-window-vscroll is non-nil, and both are on by default.

IOW, this is by design, except that Emacs was supposed to "shift" the
buffer by 1`6 pixels, not by the entire size of the image.

I will take a look to see why the vscroll scrolls by too much, but if
you don't want that at all, just customize auto-window-vscroll to nil.

> `C-u 2 C-n' will move point two lines down, however.  So the weird
> movement action apparently only happens when moving down a single line.

That's because auto-window-vscroll is only in effect when moving by
single lines.





  reply	other threads:[~2013-07-16 18:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 17:57 bug#14881: 24.3.50; Odd cursor movement with images (or lines with different heights?) Lars Magne Ingebrigtsen
2013-07-16 18:29 ` Eli Zaretskii [this message]
2013-07-16 18:39   ` Lars Magne Ingebrigtsen
2013-07-16 19:36     ` Eli Zaretskii
2013-07-16 19:41       ` Lars Magne Ingebrigtsen
2013-07-17 10:50       ` Lars Magne Ingebrigtsen
2013-07-17 16:54         ` Eli Zaretskii
2013-07-18 13:57           ` Lars Magne Ingebrigtsen
2013-07-18 16:52             ` Eli Zaretskii
2013-07-19 11:07               ` Lars Magne Ingebrigtsen
2013-07-19 14:04                 ` Eli Zaretskii
2013-07-19 14:13                   ` Lars Magne Ingebrigtsen
2013-07-19 14:31                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83hafu2wah.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=14881@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.