[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Obtain X / HPOS with move_it_to at eol when buffer-display-table lin
Re: Obtain X / HPOS with move_it_to at eol when buffer-display-table line-feed
Wed, 30 Aug 2017 22:03:52 +0300
> Date: Wed, 30 Aug 2017 11:35:21 -0700
> From: Keith David Bershatsky <address@hidden>
> Cc: address@hidden
> With respect to eol pilcrows, move_it_to gives X and HPOS coordinates for an
> invisible \n to the right of the pilcrow. We essentially have ¶\n, and IT
> cannot see the pilcrow. The X and HPOS returned by move_it_to gives us ¶|\n
> instead of |¶\n. Stated another way, X and HPOS are reported as being on the
> end of the pilcrow, instead of the beginning of the pilcrow.
But this is because you told move_it_to to move to the end of the
screen line, by specifying it.last_visible_x - 1 as the X coordinate.
What happens if you tell it to stop at the buffer position of the
> Perhaps there is some way to help move_it_to see the pilcrow, or at least
> pretend that it exists?
move_it_to always stops when it delivers characters from the buffer,
so if there are display or overlay strings, or glyphs come from a
display table, it will go on until those are exhausted, and it is back
at the next character from buffer text. So you should try stopping it
before it gets to the newline, which is displayed using the