From 6f1a46a173a3550ea78bb8076558520859a058e0 Mon Sep 17 00:00:00 2001 From: lazarus-bart Date: Sat, 7 Jul 2012 22:43:46 +0000 Subject: [PATCH] LazEdit: start with blank page by default if no files are specfied on commandline git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2477 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- applications/lazedit/main.pp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/applications/lazedit/main.pp b/applications/lazedit/main.pp index 29ecb69f0..bcbba28d6 100644 --- a/applications/lazedit/main.pp +++ b/applications/lazedit/main.pp @@ -1569,12 +1569,10 @@ procedure TLazEditMainForm.ParseCommandlineFilenames(Dummy: PtrInt); var i, Count: Integer; S: String; - OpenBlankPage: Boolean; begin //debugln('TLazEditMainForm.ParseCommandlineFilenames'); if Dummy = 12345 then Exit; //Get rid of annoying hint Count := 0; - OpenBlankPage := False; {$ifndef darwin} for i := 1 to ParamCount do begin @@ -1589,13 +1587,12 @@ begin if not TryFileOpen(S) then ShowError(Format(vTranslations.msgOpenError,[S])); end else ShowError(Format(vTranslations.msgFileNotFound,[S])); - end - else if S = opt_short_prefix + opt_short_blankpage then OpenBlankPage := True; + end; end; - {$else} - OpenBlankPage := True; //we cannot pass -n on darwin, so offer blank page to the user - {$endif} - if (Count = 0) and OpenBlankPage then DoFileNewByType(eftNone); + //Start with blank page if no files are specified on commandline + if (Count = 0) then + {$endif} //and do this by default on darwin, since we cannot specify -n on commandline for app bundle + DoFileNewByType(eftNone); end; procedure TLazEditMainForm.ParseCommandLineSwitches;