Refresh master with initial release/0.24 snapshot (#332)

* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
This commit is contained in:
Karl Burtram
2017-12-15 15:38:57 -08:00
committed by GitHub
parent 271b3a0b82
commit 6ad0df0e3e
7118 changed files with 107999 additions and 56466 deletions

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export function getSpaceCnt(str, tabSize) {
export function getSpaceCnt(str: string, tabSize: number) {
let spacesCnt = 0;
for (let i = 0; i < str.length; i++) {
@@ -17,7 +17,7 @@ export function getSpaceCnt(str, tabSize) {
return spacesCnt;
}
export function generateIndent(spacesCnt: number, tabSize, insertSpaces) {
export function generateIndent(spacesCnt: number, tabSize: number, insertSpaces: boolean) {
spacesCnt = spacesCnt < 0 ? 0 : spacesCnt;
let result = '';

View File

@@ -323,7 +323,9 @@ export class ReindentLinesAction extends EditorAction {
}
let edits = getReindentEditOperations(model, 1, model.getLineCount());
if (edits) {
editor.pushUndoStop();
editor.executeEdits(this.id, edits);
editor.pushUndoStop();
}
}
}
@@ -431,7 +433,7 @@ export class AutoIndentOnPaste implements IEditorContribution {
let textEdits: TextEdit[] = [];
let indentConverter = {
shiftIndent: (indentation) => {
shiftIndent: (indentation: string) => {
let desiredIndentCount = ShiftCommand.shiftIndentCount(indentation, indentation.length + 1, tabSize);
let newIndentation = '';
for (let i = 0; i < desiredIndentCount; i++) {
@@ -440,7 +442,7 @@ export class AutoIndentOnPaste implements IEditorContribution {
return newIndentation;
},
unshiftIndent: (indentation) => {
unshiftIndent: (indentation: string) => {
let desiredIndentCount = ShiftCommand.unshiftIndentCount(indentation, indentation.length + 1, tabSize);
let newIndentation = '';
for (let i = 0; i < desiredIndentCount; i++) {
@@ -496,7 +498,7 @@ export class AutoIndentOnPaste implements IEditorContribution {
getLanguageIdAtPosition: (lineNumber: number, column: number) => {
return model.getLanguageIdAtPosition(lineNumber, column);
},
getLineContent: (lineNumber) => {
getLineContent: (lineNumber: number) => {
if (lineNumber === startLineNumber) {
return firstLineText;
} else {