searc & replace, fix small inconsitency caused by focus stealing

This commit is contained in:
Basile Burg 2022-01-03 10:32:05 +01:00
parent 7ee77e71ef
commit 9266f32db4
3 changed files with 43 additions and 65 deletions

View File

@ -1,3 +1,9 @@
# v3.9.17-dev
## Enhancements
- Search and Replace: after a failed search give the editor the focus back.
# v3.9.17
## Enhancements

View File

@ -266,71 +266,42 @@ inherited SearchWidget: TSearchWidget
Left = 248
Top = 16
Bitmap = {
4C690200000010000000100000007B7977007B7977007B7977FF73716FFF6D6B
69FF696665FF625F5EFF615E5D007E7C7A007B7977FF73716FFF6D6B69FF6966
65FF63605FFF64616000646160007B7977007B7977007A7976FF908D8CFF908E
8CFF656461FF615E5DFF615E5D007D7B7900797775FF8E8B8AFF918F8DFF6866
64FF63605FFF64616000646160007B7977007B79770000000033787574FFCBCA
C7FF9B9A99FF625E5DFF625F5E007D7A7900787574FFCAC8C6FF989796FF605D
5CFF0000003364616000646160007B797700797875AE716E6DFF696665FF6460
5FFF625E5DFF545251AA7B7A7700656361006A6967AA6F6C6BFF696665FF6764
63FF656261FF63605FAE646160007C797800787574FFBDBBB9FFCECCCBFFA5A3
A2FF7E7C7BFF5E5B5AFF7B7977FF646260FF797675FFBCBBB8FFCECCCBFFA6A4
A3FF807E7DFF605D5CFF63605F007B787700777473FFB9B7B5FFC9C7C6FFA2A0
9FFF7D7B7AFF5C5858FF777472FF615F5DFF777473FFB9B8B5FFC9C7C6FFA2A0
9FFF7E7C7BFF605D5CFF63605F007B797700777473FFBCBAB8FFCDCBCAFFA5A3
A2FF7E7C7BFF595655FFD6D5D3FF8C8C89FF767372FFBCBAB7FFCCCAC9FFA4A2
A1FF7E7C7BFF5F5C5BFF625F5E007A7876FF6F6D6BFF666261FF605D5CFF5E5C
5AFF5E5A5AFF4946469BD3D2D0FF8A8987FF62615F9B6C6A68FF646160FF625F
5EFF615F5DFF615E5DFF615E5DA8777472FFDEDDDDFFEBEBE9FFDBDAD9FFCAC9
C8FFBBBAB9FF575453FFD6D5D3FF8C8B89FF757371FFDEDDDCFFEBEBE9FFDBDA
D9FFCAC9C8FFBCBCBBFF5E5B5AFF767472FFB3B0AEFFCAC9C7FFB0ADADFF9190
8EFF757472FF5B5857FF767472FF615F5DFF767472FFB3B1AFFFCAC9C7FFB0AD
ADFF91908EFF757573FF5F5C5BFF767472FFB3B1AFFFCAC9C7FFB1AEAEFF9392
90FF777674FF5E5A59FF7A7876FF646260FF777573FFB3B1AFFFCAC9C7FFB1AE
AEFF939290FF777674FF605D5CFF767472FFB3B1AFFFCAC9C7FFB0AEADFF9190
8EFF757472FF5E5A59FF0000003300000033777573FFB3B1AFFFCAC9C7FFB0AE
ADFF91908EFF757572FF5F5C5BFF777573FFCFCFCFFFD9D7D6FFD0CFCEFFC8C8
C7FFC3C1C1FF5E5A59FF5F5C5B007E7C7A00777573FFD0CFCFFFD9D7D6FFD0CF
CEFFC8C8C7FFC3C1C1FF5E5B5AFF7A7876FF817E7DFF9C9996FF898583FF716F
6CFF595756FF605D5CFF605D5C007F7D7B007A7876FF817E7DFF9C9996FF8985
83FF716F6CFF595756FF615E5DFF716F6DC0767472FF706D6CFF6D6A69FF6967
65FF666362FF5A5756C0605D5C007E7C7A00716F6DC0767472FF706D6CFF6D6A
69FF696765FF666362FF5A5756C0000000230000003300000033000000330000
0033000000330000002300000000000000000000002300000033000000330000
0033000000330000003300000023FFFFFF00E6974766E69547FFE69A4EFFE290
4122FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E29041FFE28E40DDFFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E28E4033E5944CFFE18939BBDF85
35AADF8231BBDF7E2E55FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E1893977E59B59FFDF8231BBDF7E
2E88E39250FFDD7F32FFDB742322FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00DF8231BBDF7E2EFFFFFFFF00FFFF
FF00DB7423CCDE833AFFD96E1C44FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00DF7E2E11DE7E2FFFDB7727AAFFFFFF00DB72
1F1190A352FF85A251F958B16203FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00DB772755E08742FFDB721F88FFFFFF0083AA
59D988CB90FF83C68BFF51A75AA8499C5203599148E5E2924377E29040BBE28D
3CBBE28B3AAAE1873966FFFFFF00DB721F99D96E1CDDD86C1BDDD8691AFF9197
49F080C588FFB0DCB6FF75B87CFF8E9146FAE4964AFFE8A361FFE28B3CFFE69E
5CFFE9A96FFFE49956FFDF823066FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF0051A75A8A71B67AFFB6C590FFE69B55FFE8A465FFE2893988FFFFFF00DF84
3588E69F61FFE59858FFDD7B2A77FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F9BCB272FFE8A05EFFBD8237FEDF853511FFFFFF00DF7E
2E99E69E61FFE1924EFFDB772566FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00419149E539853FFF317A37FF7F7A32FF95792EFCDF8230BBDF7E2CFFE392
50FFEBB386FFDC7728FFDB721F11FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00E1873711DF8435BBE59856FFE59553FFDD7B2ACCDB7727AAE69D
63FFE8A46DFFD9701ECCFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00DF8231CCE69959FFE49755FFDB7B2877FFFFFF00DB742177E18C
4CFFE18B49FFD86C1B77FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DF823044E28D44FFECB588FFDC7A2CFFDB742311DB721F22D9701EDDE6A4
71FFDC7A34FFD8671A44FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DD7B2A66E18F4CFFEBB183FFE3914EFFDA7323FFDA7428FFE08848FFE7A2
70FFE3935CFFDB7533FFD6621A44FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DB772511DB742199D9701FFFD96E1CFFD86C1BCCD8691A77D8671A77D665
1AEED6621AEED4621999D4601911
4C7A020000001000000010000000680400000000000078DA9D93FB4F936714C7
DFC4BFA03FCA9699499691C53095198231194E82B21832502E2DA5A5A52D72A9
A5F4F2D2168A93315A0AB5C571A93875809B6B62071A112C269A45AE9D90E918
050A5268876131FBD565D977CFF31610363ADC9A3C3FBCE79CCF39DF73A9C9C0
32A6C88346AD82B2B418C50A39A4621124A27CC65C65FC87AFB0400C99A480A1
6F8D658C063D1C4D8D70D81B21974928CBF1D52603636075B0DB1AE0BCD08433
0AD9B63CF92554EAB4181F1B46C72517A484271A986AA381A1F6B19121B4B7B5
A2205F081ABB993754EA3CEAB34A4E9B8CE4A6ECE9CC0CB7C9C832F242095352
5CE456959572FE225921E45209D5E0A17C95A192CB7FDF3B80C7BE715CEFEA84
B9CA04519E00B46F99B40006BD0E83DE7ECEFF757717CE99AB391D240763AA64
1956ABC1C0DD3B181D1E42E7B5ABA8361921CCCD05ABAD80449C0FCEDFFFCA4F
F36FF086083F78AF1F3F8C8F6DD4E7676761EAA727686CB442AFA920FEBBF08D
8DA2BBF32BCE2F16E671F33156EAA1529642417AA239454201440201D252533B
9EFC3889066B3DA412714759C9193AF3C85EC5F9EBFBB94135CE0702585D7D8E
D9193FC64647E0BD37809CD3A722F56D56E8346A1233B7256670D0CBCD484FF8
DB3D1E621B46CFCD9B703AECD0115B5E6E0EE7A3B5B898DEEFB6C6E8345C0F9B
7DBD1E0F2E363BC0EAB5A4073E686F74FE2C89DD2E86F6BB25B7E7557DCAD33B
A16F33BF11A3ABE0EA53DFC4C404FC3F4F6172E231464686F1FDC3871C4FFCDC
FDD398C9ED6248FF54E3A7E41E2EBB5A61ADAB855A55067E4E36A78D3CA6A6DA
C4448BA13B50AB940F680FE5CA32284BC8FFAB480E45A114829CEC0794A7F5FF
2D86F417BBDEE7DF1EB5AFFFA2C60060C26DC715E196E3085F4A47D071742FB5
FDD7473804EDC981FFC5DA9313425F9CC4A235C9BB5077C8BD70FE8077C11C9F
F5BA3CE1D850071F6B9C65A9F913046A0E62561BFB5ABDAC7158FF269C6FBEF6
30FC67DF4CD99135C7F3E6CDEF63967DD7CDB1157B788EAE4CD47566BCCCED95
EEDA89275CD6B3FA8F40380BFDAE75F3FD9671076A876CC8F8467023ED72E62E
BEF34428D87C8C0D3A92BDC1A623DEA0EDB07BB13E49B156CF457406A6CBDE08
4C17C7C0D996F6DBB94716F4CCF541D75F05BB33F5F7E5D68FB1D22541D07604
E12B423CFF568565573699D77EC5769A48DD06759F117D8F1C08776461A55B8E
A03589D3B7F0D9214BF8AA04A1F65C044CEFB1D1FA3AEA4C7B3978AB022BD744
B87F3EF14FB257DEDABC5CE12B122C36A79399BDA388C28692EA3EC40163226A
8C07D16288FF8368253BDA07BADBD5DB9F638E8DA333E345BD89FA441ED1EA0D
B56723D4728A6AF5D11D85BF2C24FD28E12F7FCBB7C34DF8C22E3E96DBB2306B
8A632377F136BBD848EED49606326F363ABB3F25D894825FEF583067DC47EF90
47B4EE253503E16E35B17D80E9A298A8B745B42A162F9CC46A6F2D969CE998D1
C462461B87679613F8A5B31C4B178598D525604ABA7D0E32571ED1EAF297EFA1
374CB5FAC86DB0A4263B258F7941B8174FA5BB5D4F0B76F3FE02A6EDD8EB
}
end
end

View File

@ -588,6 +588,7 @@ begin
if fDoc.SearchReplace(fToFind, '', getOptions).equals(0) then
begin
s := format('the expression cannot be found, restart from the %s ?', [r[chkBack.Checked]]);
fDoc.setFocus();
if dlgOkCancel(s) = mrOk then
begin
chkFromCur.Checked:=false;