mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
SVN synchronization dialog extended to support SVN-based file comparison
git-svn-id: svn://ultimatepp.org/upp/trunk@1013 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
8acbaa873b
commit
ae247b9ad4
11 changed files with 123 additions and 53 deletions
|
|
@ -38,16 +38,19 @@ void TextDiffCtrl::Set(Stream& l, Stream& r)
|
|||
Vector<String> rl = GetLineMap(r);
|
||||
Array<TextSection> sections = CompareLineMaps(ll, rl);
|
||||
|
||||
Point left_pos = left.GetPos();
|
||||
Point right_pos = right.GetPos();
|
||||
int sb_pos = left.GetSb();
|
||||
// Point left_pos = left.GetPos();
|
||||
// Point right_pos = right.GetPos();
|
||||
// int sb_pos = left.GetSb();
|
||||
|
||||
int outln = 0;
|
||||
left.SetCount(0);
|
||||
right.SetCount(0);
|
||||
int firstdiff = -1;
|
||||
for(int i = 0; i < sections.GetCount(); i++) {
|
||||
const TextSection& sec = sections[i];
|
||||
bool diff = !sec.same;
|
||||
if(firstdiff < 0 && diff)
|
||||
firstdiff = outln;
|
||||
Color c1 = (diff ? LtBlue() : SBlack()), c2 = (diff ? LtBlue() : SBlack());
|
||||
int maxcount = max(sec.count1, sec.count2);
|
||||
left.AddCount(maxcount);
|
||||
|
|
@ -67,6 +70,8 @@ void TextDiffCtrl::Set(Stream& l, Stream& r)
|
|||
right.Set(outln + l, Null, c2, Null, 2);
|
||||
outln += maxcount;
|
||||
}
|
||||
if(firstdiff >= 0)
|
||||
left.SetSb(max(firstdiff - 2, 0));
|
||||
}
|
||||
|
||||
void TextDiffCtrl::Set(const String& l, const String& r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue