unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yasushi SHOJI <yashi@atmark-techno.com>
Cc: emacs-devel@gnu.org
Subject: Re: position of line moves depending on visible chars
Date: Sun, 17 Jul 2016 17:07:24 +0300	[thread overview]
Message-ID: <83fur82w9v.fsf@gnu.org> (raw)
In-Reply-To: <877fckl7c1.wl@dns1.atmark-techno.com> (message from Yasushi SHOJI on Sun, 17 Jul 2016 22:31:10 +0900)

> Date: Sun, 17 Jul 2016 22:31:10 +0900
> From: Yasushi SHOJI <yashi@atmark-techno.com>
> 
> I'm seeing the position of a text line in an Emacs buffer moves up and
> down depending on chars in the visible area.
> 
> Let's say I'm running my Emacs on a system with two different fonts,
> each of which has different height in the buffer.  In my case they are
> Japanese chars and ASCII chars.
> 
> To reproduce this, put the following contents in an Emacs buffer and
> make the width of the window narrow enough, so that the last long line
> does not fit in the window.
> 
> あ
> ああ
> あああ
> ああああ
> あああああ
> ああああああaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> 
> Enable truncate line (M-x toggle-truncate-lines) so the longest line
> does not fold at the end.
> 
> Now, put your cursor at the last long line and do C-a / C-e to move
> back and forth.  The position of the last line moves up and down a few
> pixels depending on how much "あ" is visible/hidden. You can put more
> "あ" vertically at the point-min and you see line moves more.

This is not a bug, but the intended behavior: Emacs lays out lines
according to what is actually shown.  When you scroll the window
horizontally by typing C-e, the lines became less tall, because the
Japanese characters are not shown.

> I'm using Emacs-25 branch (80e2044a7f19719720d330e2796c9dfe5471e100)
> and this is not affect by -Q option, but rather height of fonts.  The
> master branch behaves as 25.  Emacs 24 works just fine.
> 
> Git bisect points at:
> 
> > ba5f83dfe5dea1b9dd3fca5d21384afc92cd2060 is the first bad commit
> > commit ba5f83dfe5dea1b9dd3fca5d21384afc92cd2060
> > Author: Eli Zaretskii <eliz@gnu.org>
> > Date:   Sat May 30 12:33:08 2015 +0300
> > 
> >     Fix display of cursor at end of empty lines

Yes, this is a deliberate change in behavior, as explained in the
commit log message.

Thanks.



  reply	other threads:[~2016-07-17 14:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17 13:31 position of line moves depending on visible chars Yasushi SHOJI
2016-07-17 14:07 ` Eli Zaretskii [this message]
2016-07-17 16:40   ` Yasushi SHOJI
2016-07-17 17:14     ` Eli Zaretskii
2016-07-22  0:01       ` Yasushi SHOJI
2016-07-22  7:09         ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83fur82w9v.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=yashi@atmark-techno.com \
    /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 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).