diff --git a/etc/fcl-json/src/xjsonconf.pp b/etc/fcl-json/src/xjsonconf.pp index 748b8952..f1f096a8 100644 --- a/etc/fcl-json/src/xjsonconf.pp +++ b/etc/fcl-json/src/xjsonconf.pp @@ -154,22 +154,22 @@ end; procedure TJSONConfig.Flush; Var - F : Text; + F : TFileStream; S : TJSONStringType; begin if Modified then begin - AssignFile(F,FileName); - Rewrite(F); + F:=TFileStream.Create(FileName,fmCreate); Try if Formatted then S:=FJSON.FormatJSON(Formatoptions,FormatIndentSize) else S:=FJSON.AsJSON; - Writeln(F,S); + if S>'' then + F.WriteBuffer(S[1],Length(S)); Finally - CloseFile(F); + F.Free; end; FModified := False; end; diff --git a/src/ce_dubproject.pas b/src/ce_dubproject.pas index 44b03e78..6357ac1c 100644 --- a/src/ce_dubproject.pas +++ b/src/ce_dubproject.pas @@ -370,7 +370,7 @@ begin parser := TJSONParser.Create(loader, [joIgnoreTrailingComma, joUTF8]); //TODO-cfcl-json: remove etc/fcl-json the day they'll merge and rlz the version with 'Options' //TODO-cfcl-json: track possible changes and fixes at http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-json/ - //latest in in etc = rev 33310. + //latest in etc = rev 34196. try try fJSON := parser.Parse as TJSONObject; diff --git a/src/ce_main.pas b/src/ce_main.pas index 12401191..399d80e3 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -1488,6 +1488,7 @@ procedure TCEMainForm.DoFirstShow; var url: string; begin + inherited; // TODO-cbetterfix: clipboard doesn't work first time it's used on a reloaded doc. // see: http://forum.lazarus.freepascal.org/index.php/topic,30616.0.htm if fAppliOpts.reloadLastDocuments then