摘要 |
Techniques are disclosed for editing bidirectional text, including techniques for creating, selecting, inserting, and copying bidirectional text. The disclosed techniques include a method of inserting a character in bidirectional text. The method includes receiving the character, identifying a caret location at which a visual text insertion caret is positioned in displayed bidirectional text, the caret location separating a left character and a right character having opposite text directions, determining a logical insertion location at which the character is to be stored in a data store, wherein the logical insertion location is based on logical locations of the left and right characters in the data store, a text direction of the received character, and text directions of the left and right characters, and inserting the character into the data store at the logical insertion location. |
主权项 |
1. A method of inserting a character in bidirectional text, the method comprising:
receiving, by a computer system, the character; identifying a caret location at which a visual text insertion caret is positioned in displayed bidirectional text, the caret location separating a left character and a right character having opposite text directions; determining a logical insertion location at which the character is to be stored in a data store, wherein the logical insertion location is based on logical locations of the left and right characters in the data store, a text direction of the received character, and text directions of the left and right characters; and inserting the character into the data store at the logical insertion location. |