Merge pull request #182542 from jairbubbles/fix-context-menu-for-deleted-lines-in-diff-inline

Fix context menu for deleted lines in diff inline mode
This commit is contained in:
Henning Dieterichs 2023-05-26 17:40:25 +02:00 committed by GitHub
commit 37e08ec3aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,7 @@ import { EditorOption } from 'vs/editor/common/config/editorOptions';
import { Codicon } from 'vs/base/common/codicons';
import { ThemeIcon } from 'vs/base/common/themables';
import { EndOfLineSequence, ITextModel } from 'vs/editor/common/model';
import { isIOS } from 'vs/base/common/platform';
export interface IDiffLinesChange {
readonly originalStartLineNumber: number;
@ -145,8 +146,11 @@ export class InlineDiffMargin extends Disposable {
}));
}
const useShadowDOM = editor.getOption(EditorOption.useShadowDOM) && !isIOS; // Do not use shadow dom on IOS #122035
const showContextMenu = (x: number, y: number) => {
this._contextMenuService.showContextMenu({
domForShadowRoot: useShadowDOM ? editor.getDomNode() ?? undefined : undefined,
getAnchor: () => {
return {
x,