From b27e6a4ecc482b29d2e7a98b92746fb510facc6a Mon Sep 17 00:00:00 2001 From: "Denis.Zhdanov" Date: Tue, 5 Jun 2012 15:12:58 +0400 Subject: [PATCH] IDEA-86633 Javadoc copy puts a non-lower-ascii character on the clipboard   symbols are replaced by raw white spaces at the copied javadoc text now --- .../codeInsight/documentation/DocumentationComponent.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java index a699c87e0083..f356fa43587e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java @@ -328,7 +328,9 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr @Override public Object getData(@NonNls String dataId) { if (DocumentationManager.SELECTED_QUICK_DOC_TEXT.getName().equals(dataId)) { - return myEditorPane.getSelectedText(); + // Javadocs often contain   symbols (non-breakable white space). We don't want to copy them as is and replace + // with raw white spaces. See IDEA-86633 for more details. + return myEditorPane.getSelectedText().replace((char)160, ' '); } return null;