提交 0ebe04eb 编写于 作者: S Sandeep Somavarapu

Show sub context menu if a line has more than one setting

上级 e85c2ccc
......@@ -884,7 +884,7 @@ class EditSettingRenderer extends Disposable {
private onEditSettingClicked(editPreferenceWidget: EditPreferenceWidget<ISetting>): void {
const elementPosition = DOM.getDomNodePagePosition(editPreferenceWidget.getDomNode());
const anchor = { x: elementPosition.left + elementPosition.width, y: elementPosition.top + elementPosition.height + 10 };
const actions = editPreferenceWidget.preferences.length === 1 ? this.getActions(editPreferenceWidget.preferences[0], this.getConfigurationsMap()[editPreferenceWidget.preferences[0].key])
const actions = this.getSettingsAtLineNumber(editPreferenceWidget.getLine()).length === 1 ? this.getActions(editPreferenceWidget.preferences[0], this.getConfigurationsMap()[editPreferenceWidget.preferences[0].key])
: editPreferenceWidget.preferences.map(setting => new ContextSubMenu(setting.key, this.getActions(setting, this.getConfigurationsMap()[setting.key])));
this.contextMenuService.showContextMenu({
getAnchor: () => anchor,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册