Name
pattrlist:Splice -- splice attribute list
Synopsis
pattrlist:Splice(other, pos, len)
Function
This function opens up a hole in the list, fills it in with attributes from the left, and then merges the attribute list specified by other on top of the hole.

This operation is equivalent to stretching every attribute that applies at position pos in the list by an amount len, and then calling pattrlist:Change() with a copy of each attribute in other in sequence (offset in position by pos, and limited in length to len).

This operation proves useful for, for instance, inserting a pre-edit string in the middle of an edit buffer.

For backwards compatibility, the function behaves differently when len is 0. In this case, the attributes from other are not limited to len, and are just overlayed on top of the list.

This mode is useful for merging two lists of attributes together.

Inputs
other
another Pango attribute list
pos
the position in the list at which to insert other
len
the length of the spliced segment; note that this must be specified since the attributes in other may only be present at some subsection of this range

Show TOC