From 3352eef8380a9a7f885a617e82e4eaa3d3d0b577 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 24 Dec 2020 15:41:41 +0100 Subject: [PATCH] fix, focused editor opts not applied after changes in the shortcut editor --- CHANGELOG.md | 1 + src/u_editoroptions.pas | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5eb36f6..5ba75947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/u_editoroptions.pas b/src/u_editoroptions.pas index 57530544..3400b3af 100644 --- a/src/u_editoroptions.pas +++ b/src/u_editoroptions.pas @@ -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