EDU-691 Course creator: Typing in answer placeholder doesn't change it's possible...
[idea/community.git] / python / educational-core / student / src / com / jetbrains / edu / learning / core / EduDocumentListener.java
index 61cf2c5c3845803a8c4fd3aa1a8e79db8e97c4ad..8cb13731ac97618dd95899d627715db0404235b6 100644 (file)
@@ -73,7 +73,7 @@ public class EduDocumentListener extends DocumentAdapter {
           if (answerPlaceholder.getUseLength()) {
             answerPlaceholder.setLength(length);
           } else {
-            answerPlaceholder.setPossibleAnswer(document.getText(TextRange.create(twStart, twStart + answerPlaceholder.getRealLength())));
+            answerPlaceholder.setPossibleAnswer(document.getText(TextRange.create(twStart, twStart + length)));
           }
         }
       }