mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Changing the "Open as" encoding of a newly created file clears text editor (fixes #1001)
(cherry picked from commit 3627522862)
This commit is contained in:
parent
a5264b7359
commit
c34b4dfcf2
1 changed files with 2 additions and 3 deletions
|
|
@ -551,7 +551,7 @@ begin
|
|||
end;
|
||||
|
||||
// Refresh original text and encoding
|
||||
if sEncodingIn <> sEncodingOut then
|
||||
if (sEncodingIn <> sEncodingOut) or (Length(sOriginalText) = 0) then
|
||||
begin
|
||||
sEncodingIn:= sEncodingOut;
|
||||
ChooseEncoding(miEncodingIn, sEncodingIn);
|
||||
|
|
@ -722,7 +722,6 @@ end;
|
|||
|
||||
procedure TfrmEditor.EditorChange(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
UpdateStatus;
|
||||
end;
|
||||
|
||||
|
|
@ -758,8 +757,8 @@ end;
|
|||
procedure TfrmEditor.EditorStatusChange(Sender: TObject;
|
||||
Changes: TSynStatusChanges);
|
||||
begin
|
||||
inherited;
|
||||
UpdateStatus;
|
||||
miEncodingIn.Enabled := not Editor.Modified;
|
||||
end;
|
||||
|
||||
procedure TfrmEditor.UpdateHighlighter(Highlighter: TSynCustomHighlighter);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue