Commit d0ba6c92 authored by Jucelino Fonseca's avatar Jucelino Fonseca

ajuste

parent 180b792e
......@@ -1347,13 +1347,16 @@ begin
end;
function TExplorerV2.GetTextBetweenWord(piSynEdit :TSynEdit;piWordPos: TPoint;piWord: string): string;
var p1,p2: TPoint;
//li_Pos : integer;
var p1, p2: TPoint;
li_Pos : integer;
lWord : string;
begin
if trim(piWord) = '' then
lWord := trim(piSynEdit.GetWordAtRowCol(piWordPos));
p1 := piWordPos;
p2 := piSynEdit.CaretXY;
if ((p2.Y - p1.Y) > 0) AND
(lWord = '') then
begin
p1 := piWordPos;
p2 := piSynEdit.CaretXY;
result := '';
while (result = '') and (p1.Y > 0) do
begin
......@@ -1363,11 +1366,9 @@ begin
end
else
begin
p1 := piWordPos;
p2 := piSynEdit.CaretXY;
if p2.Y <> p1.Y then
begin
p1.X := p1.X - Length(piWord);
p1.X := p1.X - Length(lWord);
end;
result := piSynEdit.TextBetweenPoints[p1,p2];
end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment