提交 91eccfdf 编写于 作者: M Matt Bierner

Strict null check contextScopedHistoryWidget

上级 2a61f8d4
......@@ -529,6 +529,7 @@
"./vs/platform/url/common/urlService.ts",
"./vs/platform/url/electron-main/electronUrlListener.ts",
"./vs/platform/url/node/urlIpc.ts",
"./vs/platform/widget/browser/contextScopedHistoryWidget.ts",
"./vs/platform/widget/common/contextScopedWidget.ts",
"./vs/platform/windows/common/windows.ts",
"./vs/platform/windows/electron-browser/windowService.ts",
......
......@@ -57,8 +57,11 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
primary: KeyCode.UpArrow,
secondary: [KeyMod.Alt | KeyCode.UpArrow],
handler: (accessor, arg2) => {
const historyInputBox: IHistoryNavigationWidget = getContextScopedWidget<IContextScopedHistoryNavigationWidget>(accessor.get(IContextKeyService), HistoryNavigationWidgetContext).historyNavigator;
historyInputBox.showPreviousValue();
const widget = getContextScopedWidget<IContextScopedHistoryNavigationWidget>(accessor.get(IContextKeyService), HistoryNavigationWidgetContext);
if (widget) {
const historyInputBox: IHistoryNavigationWidget = widget.historyNavigator;
historyInputBox.showPreviousValue();
}
}
});
......@@ -69,7 +72,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
primary: KeyCode.DownArrow,
secondary: [KeyMod.Alt | KeyCode.DownArrow],
handler: (accessor, arg2) => {
const historyInputBox: IHistoryNavigationWidget = getContextScopedWidget<IContextScopedHistoryNavigationWidget>(accessor.get(IContextKeyService), HistoryNavigationWidgetContext).historyNavigator;
historyInputBox.showNextValue();
const widget = getContextScopedWidget<IContextScopedHistoryNavigationWidget>(accessor.get(IContextKeyService), HistoryNavigationWidgetContext);
if (widget) {
const historyInputBox: IHistoryNavigationWidget = widget.historyNavigator;
historyInputBox.showNextValue();
}
}
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册