EDU-691 Course creator: Typing in answer placeholder doesn't change it's possible...
authorliana.bakradze <liana.bakradze@jetbrains.com>
Thu, 28 Jul 2016 16:19:44 +0000 (19:19 +0300)
committerliana.bakradze <liana.bakradze@jetbrains.com>
Thu, 28 Jul 2016 16:19:44 +0000 (19:19 +0300)
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)));
           }
         }
       }