fixed no highlighting after the field was enabled
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Thu, 11 Feb 2016 15:58:11 +0000 (18:58 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Thu, 11 Feb 2016 15:58:48 +0000 (18:58 +0300)
platform/platform-impl/src/com/intellij/ui/EditorTextField.java

index 2a6adfe2f35df6b8136a96d3e2eab76fc0b11b7f..b20a27e6fddf3e911ad3dc6b8c97ae6dd0bef18d 100644 (file)
@@ -468,10 +468,10 @@ public class EditorTextField extends NonOpaquePanel implements DocumentListener,
     editor.setCaretEnabled(!myIsViewer);
     settings.setLineCursorWidth(1);
 
-    if (myProject != null && myIsViewer) {
-      final PsiFile psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(editor.getDocument());
+    if (myProject != null) {
+      PsiFile psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(editor.getDocument());
       if (psiFile != null) {
-        DaemonCodeAnalyzer.getInstance(myProject).setHighlightingEnabled(psiFile, false);
+        DaemonCodeAnalyzer.getInstance(myProject).setHighlightingEnabled(psiFile, !myIsViewer);
       }
     }