ESC while typing in the input field of the search & replace widg. to give the editor the focus back

This commit is contained in:
Basile Burg 2024-01-29 06:47:29 +01:00
parent 200e197b95
commit 488301ac2c
1 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes,
RegExpr, SynEditTextBuffer, strutils,
RegExpr, SynEditTextBuffer, strutils, LCLType,
u_common, u_mru, u_widget, u_synmemo, u_interfaces, u_observer,
u_writableComponent, u_dialogs, u_sharedres, u_dsgncontrols;
@ -768,9 +768,10 @@ end;
procedure TSearchWidget.cbToFindKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if Key <> 13 then
exit;
actFindNextExecute(nil);
if Key = 13 then
actFindNextExecute(nil)
else if (key = VK_ESCAPE) and fDoc.isAssigned then
fDoc.setFocus;
end;
procedure TSearchWidget.chkEnableRepChange(Sender: TObject);