James Bonfield - 2012-04-05

I've been looking at how to handle this for insertions, deletions and replacement. Some of this is in SVN now with more to follow soon.

I don't particularly like base replacement moving sequences, as it feels wrong. Replacing doesn't break alignment, so I see no point in moving. Inserting however does, so the option of whether the left or right portion of our alignment should remain stationary (with the other half being inserted to) is useful. Deletion is similar.

There are also two different things here that are orthogonal. Firstly backspace vs delete following standard editor conventions - do we delete to the left or right of the editor cursor? (Or in Gap5's case to the left or underneath the editor cursor). Traditionally in an editor regardless of backspace or delete, it is always the characters to the left which remain stationary and the characters to the right which move left one byte. In a sequence alignment editor it is indeed useful to control both components independently.

So I have already implemented Backspace vs Delete functionality. I have also added Shift+Backspace and Shift+Delete to request the right portion of the alignmetn to remain static, forcing a movement of the sequence position instead. Similarly "i" vs "I" keys and Insert vs Shift-Insert. "*" is always a replacement operation and not an insertion, so it is not impacted.

I am changing the cursor movement too. If you want to insert "acgt" right now you can hit insert 4 times, then move left 4 bases, then overwrite "acgt". The move left bit seems redundant, so now the cursor will not move when you insert allowing you to just do insert x4 and then acgt.

Any comments?