mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: repo diff fixes
This commit is contained in:
parent
bf9b09b8af
commit
4e28164ebf
5 changed files with 12 additions and 11 deletions
|
|
@ -217,16 +217,15 @@ bool HasCrs(const String& path)
|
|||
|
||||
void DiffDlg::Write()
|
||||
{
|
||||
revert.Enable();
|
||||
if(diff.right.IsSelection()) {
|
||||
SaveFile(editfile, diff.Merge(true, HasCrs(editfile)));
|
||||
Refresh();
|
||||
revert.Enable();
|
||||
return;
|
||||
}
|
||||
if(PromptYesNo("Do you want to overwrite&[* " + DeQtf(editfile) + "] ?")) {
|
||||
SaveFile(editfile, extfile);
|
||||
Break(IDOK);
|
||||
revert.Enable();
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -125,8 +125,13 @@ void LoadGitRevisions(DropList& r, const String& dir, const String& branch, cons
|
|||
break;
|
||||
msg << l;
|
||||
}
|
||||
if(commit.GetCount())
|
||||
r.Add(commit, "\1[g [@b \1" + date + "\1] [@r \1" + author + "\1]: [* \1" + Join(Split(msg, CharFilterWhitespace), " "));
|
||||
if(commit.GetCount()) {
|
||||
String h = commit;
|
||||
if(h.GetCount() > 4)
|
||||
h.Trim(4);
|
||||
r.Add(commit, "\1[g [@b \1" + date + "\1] [@g \1" + h + "\1] [@r \1" + author + "\1]: "
|
||||
"[* \1" + Join(Split(msg, CharFilterWhitespace), " "));
|
||||
}
|
||||
date = commit = author = Null;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -173,8 +173,4 @@ void DirRepoDiffDlg::Compare()
|
|||
};
|
||||
if(Clone(0, dir1, lmid) && Clone(1, dir2, rmid))
|
||||
DirDiffDlg::Compare();
|
||||
if(IsGit(0))
|
||||
dir1 <<= Null;
|
||||
if(IsGit(1))
|
||||
dir2 <<= Null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -868,7 +868,9 @@ void Ide::CheckFileUpdate()
|
|||
|
||||
if(!editor.IsView() && !editor.IsReadOnly() && editor.GetUndoCount() &&
|
||||
max((int64)editor.GetLength(), ff.GetLength()) < 30*1024*1024) {
|
||||
ApplyChanges(editor, LoadFile(editfile));
|
||||
int c = editor.GetCursor();
|
||||
ApplyChanges(editor, LoadFile(editfile));
|
||||
editor.SetCursor(c);
|
||||
editor.ClearDirty(); // as it is "loaded"
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -490,7 +490,6 @@ void Ide::DoDirDiff()
|
|||
dlg.Dir1(dir[1]);
|
||||
dlg.SetFont(veditorfont);
|
||||
dlg.Maximize();
|
||||
dlg.Title("Compare directories");
|
||||
dlg.OpenMain();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue