@@ -852,9 +852,14 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
852
852
853
853
private _onFindInputKeyDown ( e : IKeyboardEvent ) : void {
854
854
if ( e . equals ( ctrlKeyMod | KeyCode . Enter ) ) {
855
- this . _findInput . inputBox . insertAtCursor ( '\n' ) ;
856
- e . preventDefault ( ) ;
857
- return ;
855
+ if ( this . _keybindingService . dispatchEvent ( e , e . target ) ) {
856
+ e . preventDefault ( ) ;
857
+ return ;
858
+ } else {
859
+ this . _findInput . inputBox . insertAtCursor ( '\n' ) ;
860
+ e . preventDefault ( ) ;
861
+ return ;
862
+ }
858
863
}
859
864
860
865
if ( e . equals ( KeyCode . Tab ) ) {
@@ -884,21 +889,26 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
884
889
885
890
private _onReplaceInputKeyDown ( e : IKeyboardEvent ) : void {
886
891
if ( e . equals ( ctrlKeyMod | KeyCode . Enter ) ) {
887
- if ( platform . isWindows && platform . isNative && ! this . _ctrlEnterReplaceAllWarningPrompted ) {
888
- // this is the first time when users press Ctrl + Enter to replace all
889
- this . _notificationService . info (
890
- nls . localize ( 'ctrlEnter.keybindingChanged' ,
891
- 'Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.' )
892
- ) ;
892
+ if ( this . _keybindingService . dispatchEvent ( e , e . target ) ) {
893
+ e . preventDefault ( ) ;
894
+ return ;
895
+ } else {
896
+ if ( platform . isWindows && platform . isNative && ! this . _ctrlEnterReplaceAllWarningPrompted ) {
897
+ // this is the first time when users press Ctrl + Enter to replace all
898
+ this . _notificationService . info (
899
+ nls . localize ( 'ctrlEnter.keybindingChanged' ,
900
+ 'Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.' )
901
+ ) ;
893
902
894
- this . _ctrlEnterReplaceAllWarningPrompted = true ;
895
- this . _storageService . store ( ctrlEnterReplaceAllWarningPromptedKey , true , StorageScope . GLOBAL , StorageTarget . USER ) ;
903
+ this . _ctrlEnterReplaceAllWarningPrompted = true ;
904
+ this . _storageService . store ( ctrlEnterReplaceAllWarningPromptedKey , true , StorageScope . GLOBAL , StorageTarget . USER ) ;
905
+ }
896
906
907
+ this . _replaceInput . inputBox . insertAtCursor ( '\n' ) ;
908
+ e . preventDefault ( ) ;
909
+ return ;
897
910
}
898
911
899
- this . _replaceInput . inputBox . insertAtCursor ( '\n' ) ;
900
- e . preventDefault ( ) ;
901
- return ;
902
912
}
903
913
904
914
if ( e . equals ( KeyCode . Tab ) ) {
0 commit comments