From e6751981182c35e38b0114a93cd41726af9f24fe Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 8 Jul 2018 13:27:57 +0200 Subject: [PATCH] prevent more feature that don't work when doc is not a d source --- src/ce_synmemo.pas | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index f91060f5..5a7dc256 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -1590,6 +1590,8 @@ end; procedure TCESynMemo.insertLeadingDDocSymbol(c: char); begin + if not fIsDSource and not alwaysAdvancedFeatures then + exit; BeginUndoBlock; if ((CaretX-1) and 1) = 0 then ExecuteCommand(ecChar, ' ', nil); @@ -1826,6 +1828,8 @@ var cp, st, nd: TPoint; sel: boolean; begin + if not fIsDSource and not alwaysAdvancedFeatures then + exit; fLexToks.Clear; lex(lines.Text, fLexToks, nil, [lxoNoComments]); cp := CaretXY; @@ -1886,6 +1890,8 @@ var p: TPoint; c: char; begin + if not fIsDSource and not alwaysAdvancedFeatures then + exit; if not DcdWrapper.available then exit; p := CaretXY; @@ -1949,6 +1955,8 @@ var OpenURL(rac); end; begin + if not fIsDSource and not alwaysAdvancedFeatures then + exit; if fPhobosDocRoot.dirExists then rac := 'file://' + fPhobosDocRoot else @@ -2152,6 +2160,8 @@ var tk0, tk1: PLexToken; tk: PLexToken = nil; begin + if not fIsDSource and not alwaysAdvancedFeatures then + exit; fLexToks.Clear; lex(Lines.Text, fLexToks, nil, [lxoNoComments, lxoNoWhites]); for i:=0 to fLexToks.Count-2 do @@ -2185,6 +2195,8 @@ var i: integer; j: integer = -1; begin + if not fIsDSource and not alwaysAdvancedFeatures then + exit; if not next then begin for i:= 0 to fDscannerResults.count-1 do