mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:29:28 +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;
|
FImeBlockSelection, FImeBlockSelection2: TSynEditSelection;
|
||||||
FImeMarkupSelection, FImeMarkupSelection2: TSynEditMarkupSelection;
|
FImeMarkupSelection, FImeMarkupSelection2: TSynEditMarkupSelection;
|
||||||
FInImeMsg: Boolean;
|
FInImeMsg: Boolean;
|
||||||
FRedoList: TSynEditUndoList;
|
|
||||||
FUndoList: TSynEditUndoList;
|
|
||||||
procedure SetImeTempText(const s: string);
|
procedure SetImeTempText(const s: string);
|
||||||
procedure DoOnCommand(Sender: TObject; AfterProcessing: boolean; var Handled: boolean;
|
procedure DoOnCommand(Sender: TObject; AfterProcessing: boolean; var Handled: boolean;
|
||||||
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer;
|
var Command: TSynEditorCommand; var AChar: TUTF8Char; Data: pointer;
|
||||||
@ -86,9 +84,6 @@ type
|
|||||||
procedure WMImeStartComposition(var Msg: TMessage); override;
|
procedure WMImeStartComposition(var Msg: TMessage); override;
|
||||||
procedure WMImeEndComposition(var Msg: TMessage); override;
|
procedure WMImeEndComposition(var Msg: TMessage); override;
|
||||||
procedure FocusKilled; override;
|
procedure FocusKilled; override;
|
||||||
|
|
||||||
property UndoList: TSynEditUndoList read FUndoList write FUndoList;
|
|
||||||
property RedoList: TSynEditUndoList read FRedoList write FRedoList;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -389,11 +384,11 @@ begin
|
|||||||
|
|
||||||
f := FInImeMsg;
|
f := FInImeMsg;
|
||||||
FInImeMsg := True;
|
FInImeMsg := True;
|
||||||
fUndoList.Lock;
|
ViewedTextBuffer.UndoList.Lock;
|
||||||
fRedoList.Lock;
|
ViewedTextBuffer.RedoList.Lock;
|
||||||
FImeBlockSelection.SelText := s;
|
FImeBlockSelection.SelText := s;
|
||||||
fUndoList.Unlock;
|
ViewedTextBuffer.UndoList.Unlock;
|
||||||
fRedoList.Unlock;
|
ViewedTextBuffer.RedoList.Unlock;
|
||||||
FInImeMsg := f;
|
FInImeMsg := f;
|
||||||
|
|
||||||
p2 := FImeBlockSelection.FirstLineBytePos;
|
p2 := FImeBlockSelection.FirstLineBytePos;
|
||||||
|
@ -1975,8 +1975,6 @@ begin
|
|||||||
{$IFDEF WinIME}
|
{$IFDEF WinIME}
|
||||||
{$IFDEF WinIMEFull}
|
{$IFDEF WinIMEFull}
|
||||||
FImeHandler := LazSynImeFull.Create(Self);
|
FImeHandler := LazSynImeFull.Create(Self);
|
||||||
LazSynImeFull(FImeHandler).UndoList := fUndoList;
|
|
||||||
LazSynImeFull(FImeHandler).RedoList := fRedoList;
|
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
FImeHandler := LazSynImeSimple.Create(Self);
|
FImeHandler := LazSynImeSimple.Create(Self);
|
||||||
LazSynImeSimple(FImeHandler).TextDrawer := FTextDrawer;
|
LazSynImeSimple(FImeHandler).TextDrawer := FTextDrawer;
|
||||||
|
Loading…
Reference in New Issue
Block a user