prevent more feature that don't work when doc is not a d source

This commit is contained in:
Basile Burg 2018-07-08 13:27:57 +02:00
parent f9836c9117
commit e675198118
1 changed files with 12 additions and 0 deletions

View File

@ -1590,6 +1590,8 @@ end;
procedure TCESynMemo.insertLeadingDDocSymbol(c: char); procedure TCESynMemo.insertLeadingDDocSymbol(c: char);
begin begin
if not fIsDSource and not alwaysAdvancedFeatures then
exit;
BeginUndoBlock; BeginUndoBlock;
if ((CaretX-1) and 1) = 0 then if ((CaretX-1) and 1) = 0 then
ExecuteCommand(ecChar, ' ', nil); ExecuteCommand(ecChar, ' ', nil);
@ -1826,6 +1828,8 @@ var
cp, st, nd: TPoint; cp, st, nd: TPoint;
sel: boolean; sel: boolean;
begin begin
if not fIsDSource and not alwaysAdvancedFeatures then
exit;
fLexToks.Clear; fLexToks.Clear;
lex(lines.Text, fLexToks, nil, [lxoNoComments]); lex(lines.Text, fLexToks, nil, [lxoNoComments]);
cp := CaretXY; cp := CaretXY;
@ -1886,6 +1890,8 @@ var
p: TPoint; p: TPoint;
c: char; c: char;
begin begin
if not fIsDSource and not alwaysAdvancedFeatures then
exit;
if not DcdWrapper.available then if not DcdWrapper.available then
exit; exit;
p := CaretXY; p := CaretXY;
@ -1949,6 +1955,8 @@ var
OpenURL(rac); OpenURL(rac);
end; end;
begin begin
if not fIsDSource and not alwaysAdvancedFeatures then
exit;
if fPhobosDocRoot.dirExists then if fPhobosDocRoot.dirExists then
rac := 'file://' + fPhobosDocRoot rac := 'file://' + fPhobosDocRoot
else else
@ -2152,6 +2160,8 @@ var
tk0, tk1: PLexToken; tk0, tk1: PLexToken;
tk: PLexToken = nil; tk: PLexToken = nil;
begin begin
if not fIsDSource and not alwaysAdvancedFeatures then
exit;
fLexToks.Clear; fLexToks.Clear;
lex(Lines.Text, fLexToks, nil, [lxoNoComments, lxoNoWhites]); lex(Lines.Text, fLexToks, nil, [lxoNoComments, lxoNoWhites]);
for i:=0 to fLexToks.Count-2 do for i:=0 to fLexToks.Count-2 do
@ -2185,6 +2195,8 @@ var
i: integer; i: integer;
j: integer = -1; j: integer = -1;
begin begin
if not fIsDSource and not alwaysAdvancedFeatures then
exit;
if not next then if not next then
begin begin
for i:= 0 to fDscannerResults.count-1 do for i:= 0 to fDscannerResults.count-1 do