diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorRtlTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorRtlTest.java index a4642cfb891c..3c9fa7fcda83 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorRtlTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorRtlTest.java @@ -22,6 +22,7 @@ import com.intellij.openapi.editor.VisualPosition; import com.intellij.openapi.editor.ex.EditorEx; import com.intellij.openapi.editor.impl.view.IterationState; import com.intellij.openapi.util.registry.Registry; +import com.intellij.testFramework.TestFileType; import java.awt.*; import java.io.IOException; @@ -441,6 +442,14 @@ public class EditorRtlTest extends AbstractEditorTest { assertFalse(it.hasPastLineEndBackgroundSegment()); } + public void testUsingLexerForBidiLayout() throws Exception { + init("class Foo {\n int " + RTL_CHAR + " = 1;\n}", TestFileType.JAVA); + right(); + right(); + + assertEquals(RTL_CHAR, myEditor.getDocument().getCharsSequence().charAt(myEditor.getCaretModel().getOffset() - 1)); + } + private void init(String text) throws IOException { initText(text.replace(RTL_CHAR_REPRESENTATION, RTL_CHAR)); }