emacs-devel
[Top][All Lists]
Advanced

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

Re: Problems with move_it_in_display_line_to X when tabs exist.


From: Keith David Bershatsky
Subject: Re: Problems with move_it_in_display_line_to X when tabs exist.
Date: Sat, 02 Dec 2017 14:28:31 -0800

Here are the four values.  It looks like it.current_x is where I expected it to 
be, but it.what is showing a character instead of a stretch.

(gdb) print it.what
$1 = IT_CHARACTER

(gdb) print it.char_to_display
$2 = 9

(gdb) print it.method
$3 = GET_FROM_DISPLAY_VECTOR

(gdb) print it.current_x
$4 = 44

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DATE:  [12-02-2017 13:14:33] <02 Dec 2017 23:14:33 +0200>
FROM:  Eli Zaretskii <address@hidden>
> 
> > Date:  Sat, 02 Dec 2017 11:52:33 -0800
> > From:  Keith David Bershatsky <address@hidden>
> > Cc:  address@hidden
> > 
> > The test assumes:
> > 
> > * The variable word-wrap is non-nil.
> > 
> > * The variable tab-width is 2.
> > 
> > * The buffer-display table entry for a tab is:  [(187 . 120) (9 . 121)].
> > 
> > * Native line numbers are _not_ enabled.
> > 
> > I have a long line that wraps at the window edge and I put a space to 
> > simulate a new word that should be wrapped to the following line.  To make 
> > it easier to read, I am using the backslash symbol (below) to signify a 
> > word-wrap with a space at the window edge.  The next line has three "x" 
> > followed by a tab and then the word "hello-world".  The STRETCH glyph is 22 
> > pixels wide; however, it.pixel_width is erroneously (?) reporting that it 
> > is 11 pixels wide.
> > 
> > I have hard-coded an emacs_abort () when it.c == '\t', which means that we 
> > have just moved passed character 187 (aka "ยป") and we are now on a STRETCH 
> > tab-width.
> 
> What is the value of it.what and of it.char_to_display?  And what is
> the value of it.method and it.current_x?
> 
> My crystal ball says that, since your display table shows a TAB as 2
> characters, the first of which is a u+00bb, and is displayed as an
> 11-pixel glyph, that is the display element whose metrics you are
> seeing.  The stretch glyph produced by the TAB from the display table
> is after that.



reply via email to

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