fix #271 - Creative font visualisations in merge window

This commit is contained in:
Basile Burg 2018-03-15 19:58:48 +01:00
parent 614d7a018f
commit da890afec3
2 changed files with 6 additions and 3 deletions

View File

@ -21,13 +21,13 @@ type
Panel2: TPanel;
private
public
constructor construct(const fname1, fname2: string);
constructor construct(ed: TSynEdit; const fname1, fname2: string);
end;
implementation
{$R *.lfm}
constructor TCEDiffViewer.construct(const fname1, fname2: string);
constructor TCEDiffViewer.construct(ed: TSynEdit; const fname1, fname2: string);
var
p: TProcess;
r: TStringList;
@ -36,6 +36,9 @@ begin
editor.Gutter.LineNumberPart.Visible:=false;
if ed.isNotNil then
editor.Font.Assign(ed.Font);
p := TProcess.Create(self);
try
p.Executable:= 'diff' + exeExt;

View File

@ -2999,7 +2999,7 @@ begin
begin
lines.SaveToFile(tempFilename);
fDiffDialogWillClose := true;
With TCEDiffViewer.construct(fTempFileName, fFilename) do
With TCEDiffViewer.construct(self, fTempFileName, fFilename) do
try
mr := ShowModal;
case mr of