On Thu, Jul 28, 2005 at 05:05:14PM +0200, Juergen Spitzmueller wrote:
> Problem description:
> From tabular's point of view, there are two copy stacks. The "normal" one for 
> ordinary text and math copying and tabulars's own stack (namely 
> paste_tabular_) which holds multiple cell contents. 
> Now LFUN_PASTE in insettabular just checks if there is a non-empty 
> paste_tabular_. If yes, its contents will be pasted. It doesn't care whether 
> the "normal" stack is more recent or not. In fact, it just does not know 
> that.
> So once you have copied several cells, the outside copy stack is not 
> accessible anymore from within tabular (including the tabular cell's 
> insettext contents).
> 
> One solution is to tell insettabular whether the ordinary copy stack is newer 
> than paste_tabular_. The attached patch does exactly that, adding a flag 
> tabular_stack_dirty_ to Cut and Paste.
> 
> I'm not sure if this is the best approach, or a good approach at least, so 
> please object.

A proper solution should not use this divided logic but some kind of
'grid' to hold a selection. In most cases this would be just a 1x1 grid
but in grid like structures like tables and arrays it'd be more.

The grid needs to be only conceptionaly, i.e. we don't necessarily need
a grid structure for that. IIRC math already does it that way and uses
some kind of serialization of the gid and just stores this serialized
data.

Andre'

Reply via email to