[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: TMerge editing

From: Alexander Klenin <klenin_at_gmail.com>
Date: 2007-10-28 08:51:32 CET

On 10/27/07, Simon Large <simon.tortoisesvn@googlemail.com> wrote:

> If you paste several characters into a line, it takes multiple Ctrl-Zs
> to remove them again. In most editors Ctrl-Z works on the operation,
> not the individual characters. If you paste a block of 50 lines, that
> makes it extremely slow to undo.

Fixed in revision 11147.
The problem was not a bug, but rather a case of missing functionality.
First I tried to fix it by 'bundling' all the changes into a single
'viewstate' struct.
However, it turned out that CUndo::Undo could actually correctly undo
only a limited subset of possible viewstates, due to the ambiguous ordering
of different kinds of operations. So I implemented a separate 'grouping'.
I also has suspicions that pasting a large blocks of
text might be rather wasteful of memory -- creating three viewstate
structs for every character.

So, I wonder -- would not it be a better design to create
'CEditAction' base class
with 'CChangeLine', 'CInsertLine', 'CRemoveLine', etc. as descendants,
each with its own implementation of 'Undo' virtual method?
Also, why are three viewstates per action needed -- AFAICT each of
them is always
either empty or duplicates the other two?

Alexander S. Klenin
Insight Experts Ltd.
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sun Oct 28 08:51:43 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.