bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#77924: 31.0.50; [Feature branch] Change marker implementation


From: Stefan Monnier
Subject: bug#77924: 31.0.50; [Feature branch] Change marker implementation
Date: Sat, 26 Apr 2025 22:41:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> Oh, shit, I forgot that I didn't make the forward/backward case
> symmetrical. Add this to the mix.
>
> 1 file changed, 1 insertion(+), 1 deletion(-)
> src/text-index.c | 2 +-
>
> modified   src/text-index.c
> @@ -457,7 +457,7 @@ bytepos_forward_to_charpos (struct buffer *b, const 
> struct text_pos from,
>                           ptrdiff_t to_charpos)
>  {
>    eassert (from.charpos < to_charpos);
> -  ptrdiff_t bytepos = from.bytepos;
> +  ptrdiff_t bytepos = char_start_bytepos (b, from.bytepos);
>    ptrdiff_t charpos = from.charpos;
>    while (charpos < to_charpos)
>      {

Makes more sense.  LGTM,


        Stefan






reply via email to

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