From 2a0a85596c1ce9e81e8a27891faad1f82401ec5f Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Wed, 20 May 2015 16:27:41 +0200 Subject: [PATCH] editor option, shortcut, strips the 'ec' prefix from the identifier --- src/ce_editoroptions.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ce_editoroptions.pas b/src/ce_editoroptions.pas index d2e5f603..f6402225 100644 --- a/src/ce_editoroptions.pas +++ b/src/ce_editoroptions.pas @@ -335,6 +335,9 @@ begin shrct := TCEPersistentShortcut(fShortCuts.Items[fShortcutCount]); category := 'Code editor'; identifier:= shrct.actionName; + // SynEdit shortcuts start with 'ec' + if length(identifier) > 2 then + identifier := identifier[3..length(identifier)]; aShortcut := shrct.shortcut; // fShortcutCount += 1; @@ -351,7 +354,11 @@ begin for i:= 0 to fShortCuts.Count-1 do begin 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; shc.shortcut:= aShortcut; break;