Merge pull request #16003 from aaronang/fix/shift-tab

fix(editor): Unindent line when nothing is selected
pull/16016/head
mrugesh mohapatra 2017-10-24 01:22:43 +05:30 committed by GitHub
commit 326e10feff
1 changed files with 1 additions and 5 deletions

View File

@ -78,11 +78,7 @@ export class Editor extends PureComponent {
return cm.replaceSelection(spaces);
},
'Shift-Tab': function(cm) {
if (cm.somethingSelected()) {
return cm.indentSelection('subtract');
}
const spaces = Array(cm.getOption('indentUnit') + 1).join(' ');
return cm.replaceSelection(spaces);
return cm.indentSelection('subtract');
},
'Ctrl-Enter': function() {
executeChallenge();