Commit d0ba6c92 authored by Jucelino Fonseca's avatar Jucelino Fonseca

ajuste

parent 180b792e
...@@ -1347,13 +1347,16 @@ begin ...@@ -1347,13 +1347,16 @@ begin
end; end;
function TExplorerV2.GetTextBetweenWord(piSynEdit :TSynEdit;piWordPos: TPoint;piWord: string): string; function TExplorerV2.GetTextBetweenWord(piSynEdit :TSynEdit;piWordPos: TPoint;piWord: string): string;
var p1,p2: TPoint; var p1, p2: TPoint;
//li_Pos : integer; li_Pos : integer;
lWord : string;
begin 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 begin
p1 := piWordPos;
p2 := piSynEdit.CaretXY;
result := ''; result := '';
while (result = '') and (p1.Y > 0) do while (result = '') and (p1.Y > 0) do
begin begin
...@@ -1363,11 +1366,9 @@ begin ...@@ -1363,11 +1366,9 @@ begin
end end
else else
begin begin
p1 := piWordPos;
p2 := piSynEdit.CaretXY;
if p2.Y <> p1.Y then if p2.Y <> p1.Y then
begin begin
p1.X := p1.X - Length(piWord); p1.X := p1.X - Length(lWord);
end; end;
result := piSynEdit.TextBetweenPoints[p1,p2]; result := piSynEdit.TextBetweenPoints[p1,p2];
end; 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