Subject: Re: bug#77065: 31.0.50; Infinite loop in move_it_to

From: Eli Zaretskii <[email-masked]>
Date: Mon, 17 Mar 2025 18:35:52 +0200

> Date: Mon, 17 Mar 2025 08:22:28 -0700
> Cc: [email-masked]
> From: Yifan Zhu <[email-masked]>
> 
> > Try to write some simple Lisp which arranges for a buffer to have the
> > same images in the same positions in the buffer.
> 
> Thanks, will try.

TIA.

> >> 10947          switch (skip)
> >> 10990          max_current_x = it->last_visible_x;
> >> 10995          if (it->c == '\t')
> >> 11030            it->continuation_lines_width += it->current_x;
> >> 11031          break;
> >> 11038          it->current_x = line_start_x;
> >> 11039          it->wrap_prefix_width = 0;
> >> 11040          line_start_x = 0;
> >> 11041          it->hpos = 0;
> >> 11042          it->line_number_produced_p = false;
> >> 11043          it->current_y += it->max_ascent + it->max_descent;
> >> 11044          ++it->vpos;
> >> 11045          last_height = it->max_ascent + it->max_descent;
> >> 11046          it->max_ascent = it->max_descent = 0;
> >> 10759          if (op & MOVE_TO_VPOS)
> >> 10803          else if (op & MOVE_TO_Y)
> >> 10932          else if (BUFFERP (it->object)
> >> 10933               && (it->method == GET_FROM_BUFFER
> >> 10934               || it->method == GET_FROM_STRETCH)
> >> 10945        skip = move_it_in_display_line_to (it, to_charpos, -1, MOVE_TO_POS);
> >> 10947          switch (skip)
> > Thanks, but I also need to see at least the values of it->current.
> > Does the position there never change? does it oscillate back and
> > forth? is it perhaps stuck at ZV (the EOB position)? something else?
> 
> Its value never changes during the execution of move_it_to. It is stuck at
> 
> 1: it->current = {
>    pos = {
>      charpos = 88,
>      bytepos = 88
>    },
>    overlay_string_index = -1,
>    string_pos = {
>      charpos = -1,
>      bytepos = -1
>    },
>    dpvec_index = -1
> }

Any idea what is at buffer position 88 in that buffer?