[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about display engine
From: |
Eli Zaretskii |
Subject: |
Re: Question about display engine |
Date: |
Sat, 07 Sep 2019 09:41:41 +0300 |
> Date: Sat, 7 Sep 2019 04:35:44 +0200
> From: Ergus <address@hidden>
> Cc: address@hidden, address@hidden
>
> In your solution I am facing an issue that I am not sure how to solve:
>
> I added a function handle_face_prop_general; that I call in
> extend_face_to_end_of_line but I get an inf loop because in the call
> stack I have:
>
> extend_face_to_end_of_line
> handle_face_prop_general
> face_at_buffer_position
> Fget_text_property
> Ftext_properties_at
> validate_interval_range
>
> That has a condition:
>
> if (!(BUF_BEGV (b) <= XFIXNUM (*begin)
> && XFIXNUM (*begin) <= XFIXNUM (*end)
> && XFIXNUM (*end) <= BUF_ZV (b)))
> args_out_of_range (*begin, *end);
>
> And for some reason:
>
> XFIXNUM (*end) <= BUF_ZV (b) is false; so the function args_out_of_range
> emits a signal and never returns.
You need to understand how this happens. What are the values of
*begin and *end in this case, and what is the position of the iterator
you pass to handle_face_prop_general?
> It is possible that in the first calls to extend_face_to_end_of_line the
> BUF_ZV (b) is not initialized yet?
No. But please tell more about "the first call to
extend_face_to_end_of_line". Which code calls it, and for what
buffer?
> Because it is always 1. when I print it.
If BUF_ZV is 1, it's an empty buffer.
What is it->w->contents in your call? It should be the buffer whose
text you are displaying.
- Re: Question about display engine, (continued)
Re: Question about display engine, Eli Zaretskii, 2019/09/06
- Re: Question about display engine, Ergus, 2019/09/06
- Re: Question about display engine, Eli Zaretskii, 2019/09/06
- Re: Question about display engine, Ergus, 2019/09/06
- Re: Question about display engine, Eli Zaretskii, 2019/09/06
- Re: Question about display engine, Ergus, 2019/09/06
- Re: Question about display engine,
Eli Zaretskii <=