diff options
Diffstat (limited to 'platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java')
-rw-r--r-- | platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java b/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java index a916d9e5bb34..372b14efcfe6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java +++ b/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java @@ -73,8 +73,9 @@ public class CompareClipboardWithSelection extends BaseDiffAction { SelectionModel selectionModel = myEditor.getSelectionModel(); if (selectionModel.hasSelection()) { TextRange range = new TextRange(selectionModel.getSelectionStart(), selectionModel.getSelectionEnd()); + boolean forceReadOnly = myEditor.isViewer(); myContents[1] = new FragmentContent(DiffContent.fromDocument(getProject(), getDocument()), - range, getProject(), getDocumentFile(getDocument())); + range, getProject(), getDocumentFile(getDocument()), forceReadOnly); } else { myContents [1] = DiffContent.fromDocument(getProject(), getDocument()); |