Revert "Revert "Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529)" (#5553)" (#5562)

This reverts commit c9a4f8f664.
This commit is contained in:
Anthony Dresser
2019-05-21 14:19:32 -07:00
committed by GitHub
parent 7670104e4d
commit 81ae86ff79
325 changed files with 4497 additions and 3328 deletions

View File

@@ -251,7 +251,7 @@ class ShowHoverAction extends EditorAction {
]
}, "Show Hover"),
alias: 'Show Hover',
precondition: null,
precondition: undefined,
kbOpts: {
kbExpr: EditorContextKeys.editorTextFocus,
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_I),

View File

@@ -40,7 +40,6 @@ import { applyCodeAction, QuickFixAction } from 'vs/editor/contrib/codeAction/co
import { Action } from 'vs/base/common/actions';
import { CodeActionKind } from 'vs/editor/contrib/codeAction/codeActionTrigger';
import { IModeService } from 'vs/editor/common/services/modeService';
import { withNullAsUndefined } from 'vs/base/common/types';
import { IIdentifiedSingleEditOperation } from 'vs/editor/common/model';
const $ = dom.$;
@@ -68,14 +67,13 @@ class ModesContentComputer implements IHoverComputer<HoverPart[]> {
private readonly _editor: ICodeEditor;
private _result: HoverPart[];
private _range: Range | null;
private _range?: Range;
constructor(
editor: ICodeEditor,
private readonly _markerDecorationsService: IMarkerDecorationsService
) {
this._editor = editor;
this._range = null;
}
setRange(range: Range): void {
@@ -183,7 +181,7 @@ class ModesContentComputer implements IHoverComputer<HoverPart[]> {
private _getLoadingMessage(): HoverPart {
return {
range: withNullAsUndefined(this._range),
range: this._range,
contents: [new MarkdownString().appendText(nls.localize('modesContentHover.loading', "Loading..."))]
};
}