mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 17:55:55 +02:00
SynEdit Win-IME: fix potential issue with shared edits
git-svn-id: trunk@35953 -
This commit is contained in:
parent
118c034ea5
commit
149c8660b0
@ -68,8 +68,6 @@ type
|
||||
FImeBlockSelection, FImeBlockSelection2: TSynEditSelection;
|
||||
FImeMarkupSelection, FImeMarkupSelection2: TSynEditMarkupSelection;
|
||||
FInImeMsg: Boolean;
|
||||
FRedoList: TSynEditUndoList;
|
||||
FUndoList: TSynEditUndoList;
|
||||
procedure SetImeTempText(const s: string);
|
||||
procedure DoOnCommand(Sender: TObject; AfterProcessing: boolean; var Handled: boolean;
|
||||
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer;
|
||||
@ -86,9 +84,6 @@ type
|
||||
procedure WMImeStartComposition(var Msg: TMessage); override;
|
||||
procedure WMImeEndComposition(var Msg: TMessage); override;
|
||||
procedure FocusKilled; override;
|
||||
|
||||
property UndoList: TSynEditUndoList read FUndoList write FUndoList;
|
||||
property RedoList: TSynEditUndoList read FRedoList write FRedoList;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -389,11 +384,11 @@ begin
|
||||
|
||||
f := FInImeMsg;
|
||||
FInImeMsg := True;
|
||||
fUndoList.Lock;
|
||||
fRedoList.Lock;
|
||||
ViewedTextBuffer.UndoList.Lock;
|
||||
ViewedTextBuffer.RedoList.Lock;
|
||||
FImeBlockSelection.SelText := s;
|
||||
fUndoList.Unlock;
|
||||
fRedoList.Unlock;
|
||||
ViewedTextBuffer.UndoList.Unlock;
|
||||
ViewedTextBuffer.RedoList.Unlock;
|
||||
FInImeMsg := f;
|
||||
|
||||
p2 := FImeBlockSelection.FirstLineBytePos;
|
||||
|
@ -1975,8 +1975,6 @@ begin
|
||||
{$IFDEF WinIME}
|
||||
{$IFDEF WinIMEFull}
|
||||
FImeHandler := LazSynImeFull.Create(Self);
|
||||
LazSynImeFull(FImeHandler).UndoList := fUndoList;
|
||||
LazSynImeFull(FImeHandler).RedoList := fRedoList;
|
||||
{$ELSE}
|
||||
FImeHandler := LazSynImeSimple.Create(Self);
|
||||
LazSynImeSimple(FImeHandler).TextDrawer := FTextDrawer;
|
||||
|
Loading…
Reference in New Issue
Block a user