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

View File

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