Subject: bug#28936: move_it_in_display_line_to returns MOVE_POS_MATCH_OR_ZV before ZV

From: Eli Zaretskii <[email-masked]>
Date: Mon, 23 Oct 2017 16:55:17 +0300

> Date:  Sun, 22 Oct 2017 22:20:32 -0700
> From:  Keith David Bershatsky <[email-masked]>
> Cc:  [email-masked]
> 
> I was able to verify this evening that it.current_x is indeed 0 immediately following a call to `move_it_by_lines (&it, 0)` when the issue is present.

Then perhaps the problem happens because of some factors you didn't
include in your recipe.  The comments talk about adding
lnum_pixel_width, and about using auto-hscroll = current-line mode,
but the recipe mentions nothing about that.  Is the recipe complete?

> It may be that move_it_in_display_line_to is reaching the correct X, but is merely throwing the wrong label/result in this situation -- i.e., it is not really reaching a POS or ZV.

No, that's extremely improbable, to say the least.  Like I said: these
functions work in Emacs all the time, and if they'd fail like you
describe, we'd have gazillion of display bugs.