Cleanup line insertions joined against indentation change

If the user inserted or removed a line at the start of what is also
a modification of indentation level, such as to add or remove a
control flow statement, we want to show the line insert as a whole
line insert, without the leading indentation appearing to be common
and borrowed from the next line.

Try to repair this case by shifting the edit region left until we
hit a line break, and then avoiding the shift right if the region
starts at a line break and contains at least one LF.

Change-Id: If0024b4a22434c124374b9507f59e1153836419e
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-03-02 22:20:31 -08:00
parent 3882948890
commit 17d11011ae
3 changed files with 44 additions and 17 deletions

View File

@@ -35,7 +35,7 @@ import java.io.Serializable;
import javax.annotation.Nullable;
public class PatchListKey implements Serializable {
static final long serialVersionUID = 11L;
static final long serialVersionUID = 12L;
private transient ObjectId oldId;
private transient ObjectId newId;