[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35899: 26.1; move-beginning-of-line sometimes does not move to begin
From: |
Eli Zaretskii |
Subject: |
bug#35899: 26.1; move-beginning-of-line sometimes does not move to beginning of line |
Date: |
Fri, 21 Jun 2019 15:30:39 +0300 |
> From: Noam Postavsky <npostavs@gmail.com>
> Cc: Markus Triska <triska@metalevel.at>, 35899@debbugs.gnu.org
> Date: Fri, 21 Jun 2019 06:05:22 -0400
>
> >> (If there’s an image in the line, this disregards newlines
> >> which are part of the text that the image rests on.)
> >>
> >> Hence, I expect this to move to position 1. For comparison, when I press
> >> C-a, it does move to position 1, as expected.
> >
> > "the text that the image rests on" refers to the text which is
> > "covered" by the display property, not the newlines in the binary data
> > that constitutes the image file's data.
>
> If I create an image which rests on some newlines like this:
>
> (let ((img (create-image "bug-35899-hello.png")))
> (insert "abc")
> (insert-image img "foo\nbar\nbaz")
> (insert "def"))
>
> Then with point after "def", move-beginning-of-line stops "inside" the
> image. And I don't see anything in its code which would allow it to
> skip the image. Isn't this just a doc bug?
Sorry, I don't understand the scenario, or cannot reproduce it. For
starters, there's no bug-35899-hello.png, but I guess any image will
do, so I used splash.png. But then (move-beginning-of-line nil) moves
to the beginning of "def", which is not inside the image. What did I
miss?