src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts/canToggleWordWrap
function canToggleWordWrap(editor: ICodeEditor | null): editor is IActiveCodeEditor {
	if (!editor) {
		return false;
	}
	if (editor.getContribution(DefaultSettingsEditorContribution.ID)) {
		// in the settings editor...
		return false;
	}
	if (editor.isSimpleWidget) {
		// in a simple widget...
		return false;
	}
	// Ensure correct word wrap settings
	const model = editor.getModel();
	if (!model) {
		return false;
	}
	if (model.uri.scheme === 'output') {
		// in output editor
		return false;
	}
	return true;
}