src/vs/editor/common/diff/smartLinesDiffComputer.ts/getLastNonBlankColumn
function getLastNonBlankColumn(txt: string, defaultValue: number): number {
	const r = strings.lastNonWhitespaceIndex(txt);
	if (r === -1) {
		return defaultValue;
	}
	return r + 2;
}