Fix toggling syntax highlighting on partial file

We cannot reuse the cached script data if we don't have the full
file and the user has asked us for syntax highlighting.  Instead
discard and get the full script.

Change-Id: I358ee938b12253ea9a14e9144844574778eb4978
Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java
index 84bb6cf..9c5fbce 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java
@@ -247,6 +247,13 @@
       // We don't have sufficient context.
       return false;
     }
+
+    if (s.getPrettySettings().isSyntaxHighlighting()
+        && !last.getA().isWholeFile()) {
+      // We need the whole file to syntax highlight accurately.
+      return false;
+    }
+
     return true;
   }