Merge branch 'master' of ssh://git.eclipse.org/gitroot/orion/org.eclipse.orion.client
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/searchExplorer.js b/bundles/org.eclipse.orion.client.core/web/orion/searchExplorer.js
index 2e41d4c..14f6c13 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/searchExplorer.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/searchExplorer.js
@@ -593,14 +593,16 @@
 					return;
 				}
 				this.deselectElement();
-				this.explorer.model.setCurrent(fileItemIndex, fileDetailItemIndex, storeStatus);
 				dojo.toggleClass(this.explorer.model.getId(item), "currentSearchMatch", true);
 				if(this.explorer._state !== "result_view"){
 					var rebuildPreview = (fileItemIndex !== this.explorer.model.currentFileIndex);
+					this.explorer.model.setCurrent(fileItemIndex, fileDetailItemIndex, storeStatus);
 					if(rebuildPreview){
 						this.explorer.buildPreview();
 					}
 					this.explorer.twoWayCompareContainer.gotoMatch(item.lineNumber-1, item.matches[item.matchNumber-1], item.newMatches[item.matchNumber-1], this.explorer.model.queryObj.inFileQuery.searchStrLength );
+				} else {
+					this.explorer.model.setCurrent(fileItemIndex, fileDetailItemIndex, storeStatus);
 				}
 			}
 		}