editor option, shortcut, strips the 'ec' prefix from the identifier

This commit is contained in:
Basile Burg 2015-05-20 16:27:41 +02:00
parent cdf3a86029
commit 2a0a85596c
1 changed files with 8 additions and 1 deletions

View File

@ -335,6 +335,9 @@ begin
shrct := TCEPersistentShortcut(fShortCuts.Items[fShortcutCount]); shrct := TCEPersistentShortcut(fShortCuts.Items[fShortcutCount]);
category := 'Code editor'; category := 'Code editor';
identifier:= shrct.actionName; identifier:= shrct.actionName;
// SynEdit shortcuts start with 'ec'
if length(identifier) > 2 then
identifier := identifier[3..length(identifier)];
aShortcut := shrct.shortcut; aShortcut := shrct.shortcut;
// //
fShortcutCount += 1; fShortcutCount += 1;
@ -351,7 +354,11 @@ begin
for i:= 0 to fShortCuts.Count-1 do for i:= 0 to fShortCuts.Count-1 do
begin begin
shc := TCEPersistentShortcut(fShortCuts.Items[i]); shc := TCEPersistentShortcut(fShortCuts.Items[i]);
if shc.actionName <> identifier then if length(shc.actionName) > 2 then
begin
if shc.actionName[3..length(shc.actionName)] <> identifier then
continue;
end else if shc.actionName <> identifier then
continue; continue;
shc.shortcut:= aShortcut; shc.shortcut:= aShortcut;
break; break;