mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 07:00:22 +02:00
SrcEdit: fix utf8 issue in incremental search. issue #0020288
git-svn-id: trunk@32409 -
This commit is contained in:
parent
c304336bb0
commit
b2d943371e
@ -2831,6 +2831,7 @@ Procedure TSourceEditor.ProcessCommand(Sender: TObject;
|
||||
var
|
||||
AddChar: Boolean;
|
||||
s: String;
|
||||
i: Integer;
|
||||
begin
|
||||
//DebugLn('TSourceEditor.ProcessCommand Command=',dbgs(Command));
|
||||
FSharedValues.SetActiveSharedEditor(Self);
|
||||
@ -2862,9 +2863,9 @@ begin
|
||||
|
||||
ecDeleteLastChar:
|
||||
begin
|
||||
FSourceNoteBook.IncrementalSearchStr:=
|
||||
LeftStr(FSourceNoteBook.IncrementalSearchStr,
|
||||
length(FSourceNoteBook.IncrementalSearchStr)-1);
|
||||
i := length(FSourceNoteBook.IncrementalSearchStr);
|
||||
i := UTF8FindNearestCharStart(PChar(FSourceNoteBook.IncrementalSearchStr), i, i-1);
|
||||
FSourceNoteBook.IncrementalSearchStr:= LeftStr(FSourceNoteBook.IncrementalSearchStr, i);
|
||||
Command:=ecNone;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user