未验证 提交 e0eb2e6e 编写于 作者: A Alex Dima

Fixes #110468

上级 9fbf87e3
......@@ -17,7 +17,6 @@ import { ITextResourceConfigurationService } from 'vs/editor/common/services/tex
import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions';
import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { DefaultSettingsEditorContribution } from 'vs/workbench/contrib/preferences/browser/preferencesEditor';
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
......@@ -138,12 +137,6 @@ class ToggleWordWrapAction extends EditorAction {
if (!editor.hasModel()) {
return;
}
if (editor.getOption(EditorOption.inDiffEditor)) {
// Cannot change wrapping settings inside the diff editor
const notificationService = accessor.get(INotificationService);
notificationService.info(nls.localize('wordWrap.notInDiffEditor', "Cannot toggle word wrap in a diff editor."));
return;
}
const textResourceConfigurationService = accessor.get(ITextResourceConfigurationService);
const codeEditorService = accessor.get(ICodeEditorService);
......@@ -182,7 +175,7 @@ class ToggleWordWrapController extends Disposable implements IEditorContribution
let currentlyApplyingEditorConfig = false;
this._register(editor.onDidChangeConfiguration((e) => {
if (!e.hasChanged(EditorOption.wrappingInfo) && !e.hasChanged(EditorOption.inDiffEditor)) {
if (!e.hasChanged(EditorOption.wrappingInfo)) {
return;
}
const options = this.editor.getOptions();
......@@ -218,10 +211,6 @@ class ToggleWordWrapController extends Disposable implements IEditorContribution
return;
}
if (this.editor.getOption(EditorOption.inDiffEditor)) {
return;
}
if (!canToggleWordWrap(newModel.uri)) {
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册