mirror of https://gitlab.com/basile.b/dexed.git
cosmetics changes
This commit is contained in:
parent
959a74a444
commit
474a07dca4
|
@ -735,7 +735,7 @@ end;
|
||||||
|
|
||||||
procedure TMixedIndentationDialog.spinSpacesPerTabChange(sender: TObject);
|
procedure TMixedIndentationDialog.spinSpacesPerTabChange(sender: TObject);
|
||||||
begin
|
begin
|
||||||
self.fSpacesPerTab:= TSpinEdit(sender).Value;
|
fSpacesPerTab:= TSpinEdit(sender).Value;
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
@ -2863,8 +2863,8 @@ procedure TDexedMemo.completionCodeCompletion(var value: string;
|
||||||
SourceValue: string; var SourceStart, SourceEnd: TPoint; KeyChar: TUTF8Char;
|
SourceValue: string; var SourceStart, SourceEnd: TPoint; KeyChar: TUTF8Char;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
if KeyChar <> '' then
|
if KeyChar = '' then
|
||||||
begin
|
exit;
|
||||||
if KeyChar[1] = ' ' then
|
if KeyChar[1] = ' ' then
|
||||||
value := sourceValue + KeyChar[1]
|
value := sourceValue + KeyChar[1]
|
||||||
else
|
else
|
||||||
|
@ -2875,7 +2875,6 @@ begin
|
||||||
else if KeyChar[1] in fCloseCompletionChars then
|
else if KeyChar[1] in fCloseCompletionChars then
|
||||||
value += KeyChar[1];
|
value += KeyChar[1];
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDexedMemo.completionFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure TDexedMemo.completionFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
|
@ -3073,11 +3072,15 @@ const
|
||||||
spec = '@column %d: %s' + LineEnding;
|
spec = '@column %d: %s' + LineEnding;
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
|
w: PDscannerResult;
|
||||||
begin
|
begin
|
||||||
result := '';
|
result := '';
|
||||||
for i := 0 to fDscannerResults.count-1 do
|
for i := 0 to fDscannerResults.count-1 do
|
||||||
if fDscannerResults[i]^.line = line then
|
begin
|
||||||
result += format(spec, [fDscannerResults[i]^.column, fDscannerResults[i]^.warning]);
|
w := fDscannerResults[i];
|
||||||
|
if w^.line = line then
|
||||||
|
result += format(spec, [w^.column, w^.warning]);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDexedMemo.lineHasDscannerWarning(line: integer): boolean;
|
function TDexedMemo.lineHasDscannerWarning(line: integer): boolean;
|
||||||
|
@ -3476,9 +3479,11 @@ var
|
||||||
i, len, llen: Integer;
|
i, len, llen: Integer;
|
||||||
begin
|
begin
|
||||||
result := 0;
|
result := 0;
|
||||||
if fMousePos.y-1 > Lines.Count-1 then exit;
|
if fMousePos.y-1 > Lines.Count-1 then
|
||||||
|
exit;
|
||||||
llen := Lines[fMousePos.y-1].length;
|
llen := Lines[fMousePos.y-1].length;
|
||||||
if fMousePos.X > llen then exit;
|
if fMousePos.X > llen then
|
||||||
|
exit;
|
||||||
len := getSysLineEndLen;
|
len := getSysLineEndLen;
|
||||||
for i:= 0 to fMousePos.y-2 do
|
for i:= 0 to fMousePos.y-2 do
|
||||||
result += Lines[i].length + len;
|
result += Lines[i].length + len;
|
||||||
|
@ -3495,12 +3500,10 @@ begin
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
lst.Text:=clipboard.asText;
|
lst.Text := clipboard.asText;
|
||||||
try
|
try
|
||||||
for i := 0 to lst.count-1 do
|
for i := 0 to lst.count-1 do
|
||||||
begin
|
|
||||||
lst[i] := leadingTabsToSpaces(lst[i], TabWidth);
|
lst[i] := leadingTabsToSpaces(lst[i], TabWidth);
|
||||||
end;
|
|
||||||
clipboard.asText := lst.strictText;
|
clipboard.asText := lst.strictText;
|
||||||
finally
|
finally
|
||||||
lst.free;
|
lst.free;
|
||||||
|
@ -3593,7 +3596,7 @@ begin
|
||||||
end;
|
end;
|
||||||
inherited;
|
inherited;
|
||||||
if fAutoCallCompletion and fIsDSource and (not fCompletion.IsActive) and
|
if fAutoCallCompletion and fIsDSource and (not fCompletion.IsActive) and
|
||||||
(Key < $80) and (char(Key) in ['a'..'z', 'A'..'Z']) then
|
(Key < $80) and (char(Key) in ['a'..'z', 'A'..'Z', '_']) then
|
||||||
begin
|
begin
|
||||||
fCompletion.Execute(GetWordAtRowCol(LogicalCaretXY),
|
fCompletion.Execute(GetWordAtRowCol(LogicalCaretXY),
|
||||||
ClientToScreen(point(CaretXPix, CaretYPix + LineHeight)));
|
ClientToScreen(point(CaretXPix, CaretYPix + LineHeight)));
|
||||||
|
|
Loading…
Reference in New Issue