[resend, picky postmaster rejected the message]

> > There are several alternatives to represent the same information.  E.g.,
> > instead of using a "start index" and "end index" it could be "index" and
> > "item count".  You would then have:
> >         from_index
> >         from_count
> >         to_index
> >         to_count
> >
> > That looks OK to me.  Does this also work for the byte values?  How
> > about:
> >         from_byte
> >         from_length
> 
> The modification can end in a line different from the starting line.  So the
> from_length field needs to count the number of bytes in all the lines between
> the starting line and the ending line (including the newline characters).
> Then it will be difficult to compute the column number of the ending change
> in the last line.  We need to use the from-startbyte and from-endbyte fields.

Right, if the "from" spans more than one line then "from_length" isn't
what we want.  Using "from-startbyte" and "from-endbyte" should be OK,
it's just that the names are a bit long.  This implies we should also
have "to-startbyte" and "to-endbyte", right?

In case the change only covers one item, the length can easily be
computed from "endbyte - startbyte".

Anyway, I hope this avoids the nested Dicts without making it
complicated.

-- 
All good vision statements are created by groups of people with bloated
bladders who would rather be doing anything else.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--ABD0A6082.1683378535/mail1.g16.pair.com--

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230518092401.EA74F1C0CA1%40moolenaar.net.

Raspunde prin e-mail lui