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

@@ -8,7 +8,7 @@ import { Selection } from 'vs/editor/common/core/selection';
import { editorCommand, ServicesAccessor, EditorCommand } from 'vs/editor/common/editorCommonExtensions';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { Disposable } from 'vs/base/common/lifecycle';
import { ICommonCodeEditor, IEditorContribution } from 'vs/editor/common/editorCommon';
import { ICommonCodeEditor, IEditorContribution, ScrollType } from 'vs/editor/common/editorCommon';
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions';
@@ -72,7 +72,7 @@ export class CursorUndoController extends Disposable implements IEditorContribut
this._undoStack.push(this._prevState);
if (this._undoStack.length > 50) {
// keep the cursor undo stack bounded
this._undoStack = this._undoStack.splice(0, this._undoStack.length - 50);
this._undoStack.shift();
}
}
@@ -102,6 +102,7 @@ export class CursorUndoController extends Disposable implements IEditorContribut
if (!prevState.equals(currState)) {
this._isCursorUndo = true;
this._editor.setSelections(prevState.selections);
this._editor.revealRangeInCenterIfOutsideViewport(prevState.selections[0], ScrollType.Smooth);
this._isCursorUndo = false;
return;
}