mirror of https://gitlab.com/basile.b/dexed.git
update fcl-json
This commit is contained in:
parent
5d920aef7e
commit
bcd374526f
|
@ -154,22 +154,22 @@ end;
|
||||||
procedure TJSONConfig.Flush;
|
procedure TJSONConfig.Flush;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
F : Text;
|
F : TFileStream;
|
||||||
S : TJSONStringType;
|
S : TJSONStringType;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Modified then
|
if Modified then
|
||||||
begin
|
begin
|
||||||
AssignFile(F,FileName);
|
F:=TFileStream.Create(FileName,fmCreate);
|
||||||
Rewrite(F);
|
|
||||||
Try
|
Try
|
||||||
if Formatted then
|
if Formatted then
|
||||||
S:=FJSON.FormatJSON(Formatoptions,FormatIndentSize)
|
S:=FJSON.FormatJSON(Formatoptions,FormatIndentSize)
|
||||||
else
|
else
|
||||||
S:=FJSON.AsJSON;
|
S:=FJSON.AsJSON;
|
||||||
Writeln(F,S);
|
if S>'' then
|
||||||
|
F.WriteBuffer(S[1],Length(S));
|
||||||
Finally
|
Finally
|
||||||
CloseFile(F);
|
F.Free;
|
||||||
end;
|
end;
|
||||||
FModified := False;
|
FModified := False;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -370,7 +370,7 @@ begin
|
||||||
parser := TJSONParser.Create(loader, [joIgnoreTrailingComma, joUTF8]);
|
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: 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/
|
//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
|
||||||
try
|
try
|
||||||
fJSON := parser.Parse as TJSONObject;
|
fJSON := parser.Parse as TJSONObject;
|
||||||
|
|
|
@ -1488,6 +1488,7 @@ procedure TCEMainForm.DoFirstShow;
|
||||||
var
|
var
|
||||||
url: string;
|
url: string;
|
||||||
begin
|
begin
|
||||||
|
inherited;
|
||||||
// TODO-cbetterfix: clipboard doesn't work first time it's used on a reloaded doc.
|
// 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
|
// see: http://forum.lazarus.freepascal.org/index.php/topic,30616.0.htm
|
||||||
if fAppliOpts.reloadLastDocuments then
|
if fAppliOpts.reloadLastDocuments then
|
||||||
|
|
Loading…
Reference in New Issue