ide: Git history diff dialog now sets cursor on the same line as editor

This commit is contained in:
Mirek Fidler 2024-12-16 14:01:00 +01:00
commit 3e81cb3ec1
8 changed files with 79 additions and 14 deletions

View file

@ -21,6 +21,21 @@ TextDiffCtrl::TextDiffCtrl()
right.HideSb();
left.WhenLeftDouble = THISBACK(GetLeftLine);
right.WhenLeftDouble = THISBACK(GetRightLine);
left.WhenCursor = [=] {
if(!cl) {
cl++;
right.SetLine(left.GetLine());
cl--;
}
};
right.WhenCursor = [=] {
if(!cl) {
cl++;
left.SetLine(right.GetLine());
cl--;
}
};
}
void TextDiffCtrl::GetLeftLine(int number, int line)