Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4761612

cursor problems in bidi text

XMLWordPrintable

    • Fix Understood
    • generic
    • generic

      When editing bidirectional text, cursor movement has some problems:

      1) although character-at-a-time movement moves visually, word-at-a-time movement moves logically. This is confusing if you are selecting text using keystrokes and want to include some characters and then a word.

      2) when a paragraph starts with text that is arabic, in a document with overall left-to-right direction, the paragraph will have left-to-right direction. This is ok as a default. But then cursor movement across lines the paragraph is incorrect. Moving off the left of the line goes to the right of the following line, instead of the previous line, and conversely, moving off the right of the line goes to the left of the previous line, instead of the following line. This would make sense if the paragraph were actually a right-to-left paragraph, but it isn't.

      3) Also in the above situation, clicking in the left margin to the left of the first line fails to place the caret at the start of the text. One should get a right-facing flag at the very left of the text, so that typing an LTR character there would put the character at the start of the paragraph. Instead, one gets a left-facing flag, indicating a position after the initial right-to-left run. Since position 0 in the paragraph is at a directional boundary (between the left-to-right level of the paragraph and the right-to-left level of the initial caracter) there should be two carets here, one with the flag facing left and another with the flag facing right, just as at other directional boundaries. But there is not.

      To reproduce this, launch StylePad using the jar file. At the start of the third paragraph of text, switch to an arabic or hebrew keyboard, and type in some text, so that the paragraph starts with this text. The cursor movement problems will be as described.

            peterz Peter Zhelezniakov
            dougfelt Doug Felt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: