bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17905: 24.3.50; writing with a giant font triggers RTL text entry


From: Eli Zaretskii
Subject: bug#17905: 24.3.50; writing with a giant font triggers RTL text entry
Date: Fri, 04 Jul 2014 16:34:05 +0300

> Date: Fri, 04 Jul 2014 09:39:03 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
> 
> > From: Stefan Monnier <address@hidden>
> > Cc: address@hidden,  address@hidden
> > Date: Thu, 03 Jul 2014 15:49:29 -0400
> > 
> > > If it only shows up when point is in a partially visible line, then
> > > the bug is that Emacs lets point be displayed in such a line.
> > 
> > Probably (tho I don't know why this causes point to be changed).
> 
> The display engine is probably confused by what happened, so it does
> something utterly inappropriate.  There are situations where redisplay
> moves point, but this is not one of them.
> 
> > I confirm that point (and the corresponding cursor) is at the
> > leftmost position of the partially displayed screen line in that
> > case.
> 
> That's the immediate cause of the bug, I'm quite sure.  And it goes a
> long way back.

I think I fixed this in revision 117347 on the emacs-24 branch.

In general, I recommend to stay away of resizing the font of the
default face.  The display engine does a lot of pixel calculations
using the size of the frame's default font; when that is different
from the font of the default face, all kinds of features begin to
subtly break.  E.g., set scroll-margin to a non-zero value, then type
"C-x C-+" enough time to enlarge the font significantly, and you will
see that Emacs lets point enter the scroll margin (because it
internally computes the scroll margin in pixels using the frame's
default font).

If you want to use a larger font by default, it is much better to
start Emacs with the corresponding -fn switch, or customize the
frame's font in your ~/.emacs or X resources.  That will cause Emacs
to use that font as the frame's default font, and all these issues
won't pop up.

This bug was caused by something similar to the scroll-margin problem
when the default face uses a resized font.  It caused the code which
handles redisplay of window malfunction when point ended up being
displayed in a partially visible screen line at the end of the window.

There was a similar problem in scroll commands, which caused
inappropriate moving of point in the last line of the window; I fixed
that as well.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]