mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 23:30:30 +02:00
IDE: change encoding on disk: update overide list
git-svn-id: trunk@23591 -
This commit is contained in:
parent
1c052ae3c6
commit
77a6f454ed
@ -4618,12 +4618,15 @@ begin
|
||||
// change file
|
||||
SrcEdit.CodeBuffer.DiskEncoding:=NewEncoding;
|
||||
SrcEdit.CodeBuffer.Modified:=true;
|
||||
// set override
|
||||
InputHistories.FileEncodings[SrcEdit.CodeBuffer.Filename]:=NewEncoding;
|
||||
DebugLn(['TSourceNotebook.EncodingClicked Change file to ',SrcEdit.CodeBuffer.DiskEncoding]);
|
||||
if (not SrcEdit.CodeBuffer.IsVirtual)
|
||||
and (LazarusIDE.DoSaveEditorFile(SrcEdit.PageIndex,[])<>mrOk) then begin
|
||||
DebugLn(['TSourceNotebook.EncodingClicked LazarusIDE.DoSaveEditorFile failed']);
|
||||
end;
|
||||
end else if CurResult=mrOK then begin
|
||||
// reopen with another encoding
|
||||
if SrcEdit.Modified then begin
|
||||
if IDEQuestionDialog(lisAbandonChanges,
|
||||
Format(lisAllYourModificationsToWillBeLostAndTheFileReopened, [
|
||||
|
Loading…
Reference in New Issue
Block a user