From 739d7225cf2d983c60bc2f9d6cff22a01b017858 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sat, 2 May 2020 10:19:21 +0200 Subject: [PATCH] fix, new diff dialog action didn't work due to with statement also the position in view was reset, which was not something we want --- CHANGELOG.md | 6 ++++++ src/u_synmemo.pas | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b2d995c..44432cf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v3.9.2-dev + +## Bugs fixed + +- Editor, Diff: the button used to "reload from disk and reset the history" didn't work. + # v3.9.1 ## Bugs fixed diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas index 079ed3a5..294a5767 100644 --- a/src/u_synmemo.pas +++ b/src/u_synmemo.pas @@ -3449,6 +3449,7 @@ var curMd5 : TMDDigest; str : TStringList; newTxt : string; + p : TPoint; begin if fDiffDialogWillClose or fDisableFileDateCheck then exit; @@ -3488,9 +3489,11 @@ begin end; mrAll: begin + p := self.CaretXY; fModified := false; - text := newTxt; + self.text := newTxt; fFileDate := newDate; + CaretXY := p; end; mrIgnore: begin