mirror of https://gitlab.com/basile.b/dexed.git
fix #97 - content reloaded after diff dialog could be outdated
This commit is contained in:
parent
95f9babd0c
commit
514ffb967a
|
@ -4,9 +4,13 @@
|
||||||
|
|
||||||
- messages, search results: exclude backticks if the option _backTicksHighlight_ is enabled.
|
- messages, search results: exclude backticks if the option _backTicksHighlight_ is enabled.
|
||||||
|
|
||||||
|
## Bugs fixed
|
||||||
|
|
||||||
|
- diff dialog: the content reloaded matched to the state when the dialog was shown, not when closed. (#97)
|
||||||
|
|
||||||
# v3.9.12
|
# v3.9.12
|
||||||
|
|
||||||
## Enhancement
|
## Enhancements
|
||||||
|
|
||||||
- editor: a new option, _textCompletion_, sets if the completion menu includes the identifiers obtained by word-splitting the whole document. (#85)
|
- editor: a new option, _textCompletion_, sets if the completion menu includes the identifiers obtained by word-splitting the whole document. (#85)
|
||||||
- editor: prevent completion menu to show on fast enough (< to the _autoDotDelay_ setting) `..`.
|
- editor: prevent completion menu to show on fast enough (< to the _autoDotDelay_ setting) `..`.
|
||||||
|
@ -58,7 +62,7 @@
|
||||||
|
|
||||||
# v3.9.9
|
# v3.9.9
|
||||||
|
|
||||||
## Enhancement
|
## Enhancements
|
||||||
|
|
||||||
- GDB commander: The widget is now activated on Windows systems. Note that it might only works if the project is compiled with LDC >= 1.23.0 and if debug info are generated and if the _-gdwarf_ switch is also part of the config.
|
- GDB commander: The widget is now activated on Windows systems. Note that it might only works if the project is compiled with LDC >= 1.23.0 and if debug info are generated and if the _-gdwarf_ switch is also part of the config.
|
||||||
See [LDC announcement](https://forum.dlang.org/post/ssvxmrdpklhsrqlgrzas@forum.dlang.org). GDB for windows can be found [here](https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Alternative%20GDB/) for example.
|
See [LDC announcement](https://forum.dlang.org/post/ssvxmrdpklhsrqlgrzas@forum.dlang.org). GDB for windows can be found [here](https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Alternative%20GDB/) for example.
|
||||||
|
|
|
@ -3506,9 +3506,19 @@ var
|
||||||
newDate : double;
|
newDate : double;
|
||||||
newMd5 : TMDDigest;
|
newMd5 : TMDDigest;
|
||||||
curMd5 : TMDDigest;
|
curMd5 : TMDDigest;
|
||||||
str : TStringList;
|
|
||||||
newTxt : string;
|
|
||||||
p : TPoint;
|
p : TPoint;
|
||||||
|
|
||||||
|
function reload(): string;
|
||||||
|
begin
|
||||||
|
with TStringList.Create() do
|
||||||
|
try
|
||||||
|
LoadFromFile(fFilename);
|
||||||
|
result := strictText();
|
||||||
|
finally
|
||||||
|
Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if fDiffDialogWillClose or fDisableFileDateCheck then
|
if fDiffDialogWillClose or fDisableFileDateCheck then
|
||||||
exit;
|
exit;
|
||||||
|
@ -3523,14 +3533,7 @@ begin
|
||||||
exit;
|
exit;
|
||||||
if (fFileDate <> 0.0) then
|
if (fFileDate <> 0.0) then
|
||||||
begin
|
begin
|
||||||
str := TStringList.Create;
|
newMd5 := MD5String(reload());
|
||||||
try
|
|
||||||
str.LoadFromFile(fFilename);
|
|
||||||
newTxt := str.strictText;
|
|
||||||
finally
|
|
||||||
str.Free;
|
|
||||||
end;
|
|
||||||
newMd5 := MD5String(newTxt);
|
|
||||||
curMd5 := MD5String(lines.strictText);
|
curMd5 := MD5String(lines.strictText);
|
||||||
if not MDMatch(curMd5, newMd5) then
|
if not MDMatch(curMd5, newMd5) then
|
||||||
begin
|
begin
|
||||||
|
@ -3542,7 +3545,7 @@ begin
|
||||||
case mr of
|
case mr of
|
||||||
mrOK:
|
mrOK:
|
||||||
begin
|
begin
|
||||||
replaceUndoableContent(newTxt);
|
replaceUndoableContent(reload());
|
||||||
fModified := false;
|
fModified := false;
|
||||||
fFileDate := newDate;
|
fFileDate := newDate;
|
||||||
fCanDscan := true;
|
fCanDscan := true;
|
||||||
|
@ -3552,7 +3555,7 @@ begin
|
||||||
fCanDscan := true;
|
fCanDscan := true;
|
||||||
p := self.CaretXY;
|
p := self.CaretXY;
|
||||||
fModified := false;
|
fModified := false;
|
||||||
self.text := newTxt;
|
self.text := reload();
|
||||||
fFileDate := newDate;
|
fFileDate := newDate;
|
||||||
CaretXY := p;
|
CaretXY := p;
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue