mirror of https://gitlab.com/basile.b/dexed.git
added funct isStringDisabled()
This commit is contained in:
parent
3fbb09be4f
commit
a1e83f3bdc
|
@ -224,6 +224,13 @@ type
|
||||||
*)
|
*)
|
||||||
function isEditable(const ext: string): boolean;
|
function isEditable(const ext: string): boolean;
|
||||||
|
|
||||||
|
(**
|
||||||
|
* Returns true if str starts with a semicolon or a double slash.
|
||||||
|
* This is used to disable TStringList items in several places
|
||||||
|
*)
|
||||||
|
function isStringDisabled(const str: string): boolean;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1032,6 +1039,17 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function isStringDisabled(const str: string): boolean;
|
||||||
|
begin
|
||||||
|
result := false;
|
||||||
|
if str = '' then
|
||||||
|
exit;
|
||||||
|
if str[1] = ';' then
|
||||||
|
result := true;
|
||||||
|
if (length(str) > ) and (str[1..2] = '//') then
|
||||||
|
result := true;
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
registerClasses([TCEPersistentShortcut]);
|
registerClasses([TCEPersistentShortcut]);
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in New Issue