src/vs/editor/common/cursor/cursorWordOperations.ts/WordOperations/_deleteInsideWordDetermineDeleteRange
class WordOperations:	private static _deleteInsideWordDetermineDeleteRange(wordSeparators: WordCharacterClassifier, model: ICursorSimpleModel, position: Position): Range {
		const lineContent = model.getLineContent(position.lineNumber);
		const lineLength = lineContent.length;
		if (lineLength === 0) {
			// empty line
			if (position.lineNumber > 1) {
				return new Range(position.lineNumber - 1, model.getLineMaxColumn(position.lineNumber - 1), position.lineNumber, 1);
			} else {
				if (position.lineNumber < model.getLineCount()) {
					return new Range(position.lineNumber, 1, position.lineNumber + 1, 1);
				} else {
					// empty model
					return new Range(position.lineNumber, 1, position.lineNumber, 1);
				}
			}
		}

		const touchesWord = (word: IFindWordResult) => {
			return (word.start + 1 <= position.column && position.column <= word.end + 1);
		};
		const createRangeWithPosition = (startColumn: number, endColumn: number) => {
			startColumn = Math.min(startColumn, position.column);
			endColumn = Math.max(endColumn, position.column);
			return new Range(position.lineNumber, startColumn, position.lineNumber, endColumn);
		};
		const deleteWordAndAdjacentWhitespace = (word: IFindWordResult) => {
			let startColumn = word.start + 1;
			let endColumn = word.end + 1;
			let expandedToTheRight = false;
			while (endColumn - 1 < lineLength && this._charAtIsWhitespace(lineContent, endColumn - 1)) {
				expandedToTheRight = true;
				endColumn++;
			}
			if (!expandedToTheRight) {
				while (startColumn > 1 && this._charAtIsWhitespace(lineContent, startColumn - 2)) {
					startColumn--;
				}
			}
			return createRangeWithPosition(startColumn, endColumn);
		};

		const prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, position);
		if (prevWordOnLine && touchesWord(prevWordOnLine)) {
			return deleteWordAndAdjacentWhitespace(prevWordOnLine);
		}
		const nextWordOnLine = WordOperations._findNextWordOnLine(wordSeparators, model, position);
		if (nextWordOnLine && touchesWord(nextWordOnLine)) {
			return deleteWordAndAdjacentWhitespace(nextWordOnLine);
		}
		if (prevWordOnLine && nextWordOnLine) {
			return createRangeWithPosition(prevWordOnLine.end + 1, nextWordOnLine.start + 1);
		}
		if (prevWordOnLine) {
			return createRangeWithPosition(prevWordOnLine.start + 1, prevWordOnLine.end + 1);
		}
		if (nextWordOnLine) {
			return createRangeWithPosition(nextWordOnLine.start + 1, nextWordOnLine.end + 1);
		}

		return createRangeWithPosition(1, lineLength + 1);
	}