mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-07 10:40:19 -05:00
Changed the way tabs are handled (no more SmartTabs by default).
This commit is contained in:
parent
87440431fb
commit
b0a64c3331
@ -356,6 +356,12 @@ begin
|
|||||||
try
|
try
|
||||||
Filter := WordAtCaret(Synedit, sp, ep);
|
Filter := WordAtCaret(Synedit, sp, ep);
|
||||||
Form1.CodeCompletionStart := Point(sp, Synedit.CaretY);
|
Form1.CodeCompletionStart := Point(sp, Synedit.CaretY);
|
||||||
|
|
||||||
|
//mp.Run(ms, nil, Synedit.SelStart + (ep - Synedit.CaretX) - 1);
|
||||||
|
s := SynEdit.Lines[SynEdit.Carety-1];
|
||||||
|
if ep > length(s) then //We are outside the real text, go back to the last char
|
||||||
|
mp.Run(ms, nil, Synedit.SelStart - ep + length(s))
|
||||||
|
else
|
||||||
mp.Run(ms, nil, Synedit.SelStart + (ep - Synedit.CaretX) - 1);
|
mp.Run(ms, nil, Synedit.SelStart + (ep - Synedit.CaretX) - 1);
|
||||||
|
|
||||||
s := mp.GetExpressionAtPos;
|
s := mp.GetExpressionAtPos;
|
||||||
@ -602,11 +608,13 @@ begin
|
|||||||
FScriptState:= ss_None;
|
FScriptState:= ss_None;
|
||||||
ScriptErrorLine:= -1;
|
ScriptErrorLine:= -1;
|
||||||
OwnerSheet.Caption:= ScriptName;
|
OwnerSheet.Caption:= ScriptName;
|
||||||
SynEdit.Options:= SynEdit.Options- [eoGroupUndo];
|
SynEdit.Options:= SynEdit.Options + [eoTabIndent] - [{eoGroupUndo,} eoSmartTabs];
|
||||||
SynEdit.Options:= SynEdit.Options+ [eoGroupUndo,eoPersistentCaret];
|
//SynEdit.Options:= SynEdit.Options + [eoTabIndent];
|
||||||
SynEdit.IncrementColor.Background := $30D070;
|
SynEdit.IncrementColor.Background := $30D070;
|
||||||
SynEdit.HighlightAllColor.Background:= clYellow;
|
SynEdit.HighlightAllColor.Background:= clYellow;
|
||||||
SynEdit.HighlightAllColor.Foreground:= clDefault;
|
SynEdit.HighlightAllColor.Foreground:= clDefault;
|
||||||
|
SynEdit.TabWidth := 2;
|
||||||
|
SynEdit.BlockIndent := 2;
|
||||||
MarkCaret := TSynEditMarkupHighlightAllCaret(SynEdit.MarkupByClass[TSynEditMarkupHighlightAllCaret]);
|
MarkCaret := TSynEditMarkupHighlightAllCaret(SynEdit.MarkupByClass[TSynEditMarkupHighlightAllCaret]);
|
||||||
if assigned(MarkCaret) then
|
if assigned(MarkCaret) then
|
||||||
begin
|
begin
|
||||||
|
@ -120,7 +120,6 @@ type
|
|||||||
function GetName: TciProcedureName;
|
function GetName: TciProcedureName;
|
||||||
function GetProcType: string;
|
function GetProcType: string;
|
||||||
function GetParams: string;
|
function GetParams: string;
|
||||||
function GetSynParams: string;
|
|
||||||
|
|
||||||
function GetShortText: string; override;
|
function GetShortText: string; override;
|
||||||
public
|
public
|
||||||
@ -130,7 +129,6 @@ type
|
|||||||
property Name : TciProcedureName read GetName;
|
property Name : TciProcedureName read GetName;
|
||||||
property ProcType: string read GetProcType;
|
property ProcType: string read GetProcType;
|
||||||
property Params: string read GetParams;
|
property Params: string read GetParams;
|
||||||
property SynParams: string read GetSynParams;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TciUsedUnit = class(TDeclaration); //Included Units
|
TciUsedUnit = class(TDeclaration); //Included Units
|
||||||
@ -872,51 +870,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TciProcedureDeclaration.GetSynParams: string;
|
|
||||||
var
|
|
||||||
i, ii: Integer;
|
|
||||||
a, b: TDeclarationArray;
|
|
||||||
d: TDeclaration;
|
|
||||||
s, t: string;
|
|
||||||
begin
|
|
||||||
Result := '';
|
|
||||||
if (fSynParams <> '') then
|
|
||||||
Result := fSynParams
|
|
||||||
else if (fItems.Count > 0) then
|
|
||||||
begin
|
|
||||||
a := GetParamDeclarations;
|
|
||||||
for i := Low(a) to High(a) do
|
|
||||||
begin
|
|
||||||
if (a[i] is TciConstParameter) then
|
|
||||||
s := 'const '
|
|
||||||
else if (a[i] is TciOutParameter) then
|
|
||||||
s := 'out '
|
|
||||||
else if (a[i] is TciInParameter) then
|
|
||||||
s := 'in '
|
|
||||||
else if (a[i] is TciVarParameter) then
|
|
||||||
s := 'var '
|
|
||||||
else
|
|
||||||
s := '';
|
|
||||||
d := a[i].Items.GetFirstItemOfClass(TciParameterType);
|
|
||||||
if (d <> nil) then
|
|
||||||
t := ': ' + d.ShortText
|
|
||||||
else
|
|
||||||
t := '';
|
|
||||||
b := a[i].Items.GetItemsOfClass(TciParameterName);
|
|
||||||
for ii := Low(b) to High(b) do
|
|
||||||
begin
|
|
||||||
if (fSynParams <> '') then
|
|
||||||
fSynParams := fSynParams + ';","' + s + b[ii].ShortText + t
|
|
||||||
else
|
|
||||||
fSynParams := '"' + s + b[ii].ShortText + t;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
if (fSynParams <> '') then
|
|
||||||
fSynParams := fSynParams + '"';
|
|
||||||
Result := fSynParams;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TciProcedureDeclaration.GetShortText: string;
|
function TciProcedureDeclaration.GetShortText: string;
|
||||||
begin
|
begin
|
||||||
if (fShortText = '') then
|
if (fShortText = '') then
|
||||||
|
Loading…
Reference in New Issue
Block a user