src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.ts/ToggleWordWrapAction/run
class ToggleWordWrapAction:	public run(accessor: ServicesAccessor, editor: ICodeEditor): void {
		if (!canToggleWordWrap(editor)) {
			return;
		}

		const codeEditorService = accessor.get(ICodeEditorService);
		const model = editor.getModel();

		// Read the current state
		const transientState = readTransientState(model, codeEditorService);

		// Compute the new state
		let newState: IWordWrapTransientState | null;
		if (transientState) {
			newState = null;
		} else {
			const actualWrappingInfo = editor.getOption(EditorOption.wrappingInfo);
			const wordWrapOverride = (actualWrappingInfo.wrappingColumn === -1 ? 'on' : 'off');
			newState = { wordWrapOverride };
		}

		// Write the new state
		// (this will cause an event and the controller will apply the state)
		writeTransientState(model, newState, codeEditorService);
	}