mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 06:38:23 +00:00
Always hide cut/copy/paste menu in the notebooks (#208297)
* Include execution count in notebook diff * Fix tests * Misc changes * Fix tests * Fix more tests * Always hide cut/copy/paste menu in the notebooks
This commit is contained in:
parent
22b6f2fb6c
commit
8852f4a954
1 changed files with 4 additions and 1 deletions
|
@ -41,7 +41,7 @@ import { SuggestController } from 'vs/editor/contrib/suggest/browser/suggestCont
|
|||
import * as nls from 'vs/nls';
|
||||
import { MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
|
@ -102,6 +102,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
|||
import { OutlineTarget } from 'vs/workbench/services/outline/browser/outline';
|
||||
import { PixelRatio } from 'vs/base/browser/pixelRatio';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { PreventDefaultContextMenuItemsContextKeyName } from 'vs/workbench/contrib/webview/browser/webview.contribution';
|
||||
import { NotebookAccessibilityProvider } from 'vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider';
|
||||
|
||||
const $ = DOM.$;
|
||||
|
@ -420,6 +421,8 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
|
|||
this._outputInputFocus = NOTEBOOK_OUPTUT_INPUT_FOCUSED.bindTo(this.scopedContextKeyService);
|
||||
this._editorEditable = NOTEBOOK_EDITOR_EDITABLE.bindTo(this.scopedContextKeyService);
|
||||
this._cursorNavMode = NOTEBOOK_CURSOR_NAVIGATION_MODE.bindTo(this.scopedContextKeyService);
|
||||
// Never display the native cut/copy context menu items in notebooks
|
||||
new RawContextKey<boolean>(PreventDefaultContextMenuItemsContextKeyName, false).bindTo(this.scopedContextKeyService).set(true);
|
||||
|
||||
this._editorEditable.set(!creationOptions.isReadOnly);
|
||||
|
||||
|
|
Loading…
Reference in a new issue