fix, focused editor opts not applied after changes in the shortcut editor

This commit is contained in:
Basile Burg 2020-12-24 15:41:41 +01:00
parent 3b46ffb013
commit 3352eef838
2 changed files with 3 additions and 3 deletions

View File

@ -3,6 +3,7 @@
## Bugs fixed
- Editor tabs: caption not updated when split page is closed using the File menu or the shortcut.
- Editor shortcuts: no applied to current editor until restart or file close/reopen.
# v3.9.9

View File

@ -594,6 +594,8 @@ var
begin
s := TPersistentShortcut(fShortCuts.Items[index]);
s.shortcut := item.shortcut;
if index = scedCount - 1 then
applyChangesFromSelf();
end;
{$ENDREGION}
@ -662,7 +664,6 @@ var
i, j: Integer;
shc: TPersistentShortcut;
kst: TSynEditKeyStroke;
dup: boolean;
savedSize: integer;
cs: TSysCharSet;
c: char;
@ -759,11 +760,9 @@ begin
kst := anEditor.Keystrokes.Items[i];
for j := 0 to fShortCuts.Count-1 do
begin
dup := false;
shc := TPersistentShortcut(fShortCuts.Items[j]);
if shc.actionName = EditorCommandToCodeString(kst.Command) then
begin
if not dup then
try
kst.shortCut := shc.shortcut;
except