From 36c0fb5e4293dfa35454d0ab33059a38824aafc8 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 20 Jun 2017 10:35:25 +0100 Subject: [PATCH] JAL-2526 don't retain lastColumnPosition from an invalidated cursor --- src/jalview/datamodel/Sequence.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 96747e4..783b1bc 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -723,7 +723,10 @@ public class Sequence extends ASequence implements SequenceI */ protected void updateCursor(int residuePos, int column, int startColumn) { - int endColumn = cursor == null ? 0 : cursor.lastColumnPosition; + /* + * preserve end residue column provided cursor was valid + */ + int endColumn = isValidCursor(cursor) ? cursor.lastColumnPosition : 0; if (residuePos == this.end) { endColumn = column; -- 1.7.10.2