mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
ide: Directory compare dblclick now goes to the line in editor #857
git-svn-id: svn://ultimatepp.org/upp/trunk@7904 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bc2cda8174
commit
375716f7d4
4 changed files with 24 additions and 1 deletions
|
|
@ -188,7 +188,6 @@ struct PatchDiff : FileDiff {
|
|||
|
||||
class DirDiffDlg : public TopWindow {
|
||||
Splitter files_diff;
|
||||
TextDiffCtrl diff;
|
||||
ParentCtrl files_pane;
|
||||
FileList files;
|
||||
|
||||
|
|
@ -210,6 +209,8 @@ class DirDiffDlg : public TopWindow {
|
|||
void Copy(bool left);
|
||||
|
||||
public:
|
||||
TextDiffCtrl diff;
|
||||
|
||||
typedef DirDiffDlg CLASSNAME;
|
||||
|
||||
void SetFont(Font fnt) { diff.SetFont(fnt); }
|
||||
|
|
@ -218,6 +219,9 @@ public:
|
|||
void Dir1AddList(const String& dir) { dir1.AddList(dir); }
|
||||
void Dir2AddList(const String& dir) { dir2.AddList(dir); }
|
||||
|
||||
String GetLeftFile() const { return ~lfile; }
|
||||
String GetRightFile() const { return ~rfile; }
|
||||
|
||||
DirDiffDlg();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -585,6 +585,7 @@ void Ide::GotoDiffLeft(int line, DiffDlg *df)
|
|||
{
|
||||
EditFile(df->editfile);
|
||||
editor.SetCursor(editor.GetPos(line));
|
||||
editor.SetFocus();
|
||||
}
|
||||
|
||||
void Ide::GotoDiffRight(int line, FileDiff *df)
|
||||
|
|
|
|||
|
|
@ -1103,6 +1103,8 @@ public:
|
|||
void Qtf();
|
||||
void Xml();
|
||||
void Json();
|
||||
void GotoDirDiffLeft(int line, DirDiffDlg *df);
|
||||
void GotoDirDiffRight(int line, DirDiffDlg *df);
|
||||
void DoDirDiff();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -416,6 +416,20 @@ void Ide::SyncSvnDir(const String& working)
|
|||
SyncSvnDirs(Vector<String>() << working);
|
||||
}
|
||||
|
||||
void Ide::GotoDirDiffLeft(int line, DirDiffDlg *df)
|
||||
{
|
||||
EditFile(df->GetLeftFile());
|
||||
editor.SetCursor(editor.GetPos(line));
|
||||
editor.SetFocus();
|
||||
}
|
||||
|
||||
void Ide::GotoDirDiffRight(int line, DirDiffDlg *df)
|
||||
{
|
||||
EditFile(df->GetRightFile());
|
||||
editor.SetCursor(editor.GetPos(line));
|
||||
editor.SetFocus();
|
||||
}
|
||||
|
||||
void Ide::DoDirDiff()
|
||||
{
|
||||
Index<String> dir;
|
||||
|
|
@ -437,6 +451,8 @@ void Ide::DoDirDiff()
|
|||
SortIndex(dir);
|
||||
|
||||
static DirDiffDlg dlg;
|
||||
dlg.diff.WhenLeftLine = THISBACK1(GotoDirDiffLeft, &dlg);
|
||||
dlg.diff.WhenRightLine = THISBACK1(GotoDirDiffRight, &dlg);
|
||||
for(int i = 0; i < dir.GetCount(); i++) {
|
||||
dlg.Dir1AddList(dir[i]);
|
||||
dlg.Dir2AddList(dir[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue