mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
test case for a change in commit 4450360 (apply bidi layout algorithm only within lexical entities)
This commit is contained in:
@@ -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<caret> " + 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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user