File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/scm/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
7474import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget' ;
7575import { IModeService } from 'vs/editor/common/services/modeService' ;
7676import { ILabelService } from 'vs/platform/label/common/label' ;
77+ import { KeyCode } from 'vs/base/common/keyCodes' ;
7778
7879type TreeElement = ISCMResourceGroup | IResourceNode < ISCMResource , ISCMResourceGroup > | ISCMResource ;
7980
@@ -863,6 +864,10 @@ export class RepositoryPane extends ViewPane {
863864
864865 this . _register ( this . inputEditor . onDidChangeCursorPosition ( triggerValidation ) ) ;
865866
867+ const opts = this . modelService . getCreationOptions ( this . inputModel . getLanguageIdentifier ( ) . language , this . inputModel . uri , this . inputModel . isForSimpleWidget ) ;
868+ const onEnter = Event . filter ( this . inputEditor . onKeyDown , e => e . keyCode === KeyCode . Enter ) ;
869+ this . _register ( onEnter ( ( ) => this . inputModel . detectIndentation ( opts . insertSpaces , opts . tabSize ) ) ) ;
870+
866871 // Keep model in sync with API
867872 this . inputModel . setValue ( this . repository . input . value ) ;
868873 this . _register ( this . repository . input . onDidChange ( value => {
You can’t perform that action at this time.
0 commit comments