From 77a6f454edd5fd01a081939d2ea4f7d09aa0a569 Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 29 Jan 2010 09:37:05 +0000 Subject: [PATCH] IDE: change encoding on disk: update overide list git-svn-id: trunk@23591 - --- ide/sourceeditor.pp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index af0870de6c..eddd078f54 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -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, [