 
 			selected_pathname = @$scope.history.selection.pathname
 
-			console.log "[_calculateDiffDataFromSelection]", @$scope.history.selection.updates
 			for pathname, doc of @_perDocSummaryOfUpdates(@$scope.history.selection.updates)
-				console.log "[_calculateDiffDataFromSelection] doc:", pathname, doc
 				if pathname == selected_pathname
 					{fromV, toV} = doc
-					break
-
-			return {fromV, toV, pathname}
+					return {fromV, toV, pathname}
+
+			return {}
 
 		# Set the track changes selected doc to one of the docs in the range
 		# of currently selected updates. If we already have a selected doc

				atEnd: false
				selection: {
					updates: []
					doc: null
					range: {
						fromV: null
						toV: null

				error:    false
			}

			diff.loading = true
			url = "/project/#{@$scope.project_id}/diff"
			query = ["pathname=#{encodeURIComponent(pathname)}"]
			if diff.fromV? and diff.toV?
				query.push "from=#{diff.fromV}", "to=#{diff.toV}"
			url += "?" + query.join("&")

			@ide.$http
				.get(url)
				.then (response) =>
					{ data } = response
					diff.loading = false
					{text, highlights} = @_parseDiff(data)
					diff.text = text
					diff.highlights = highlights
				.catch () ->
					diff.loading = false
					diff.error = true

		_parseDiff: (diff) ->
			row    = 0
