16 Jan 17:54
Handling invisible text in bidirectional display
Eli Zaretskii <eliz <at> gnu.org>
2010-01-16 16:54:58 GMT
2010-01-16 16:54:58 GMT
This is another design decision I needed to make -- how to handle invisible text in the display engine modified to support bidirectional text. The current unidirectional display code simply skips all the characters that have the invisible property (or are covered by an overlay with such a property). The iteration then resumes at the first character that does not have the invisible property. Thus, Emacs behaves as if the invisible characters simply did not exist in the buffer. But with bidirectional display, the invisible property can begin and/or end in the middle of text that is reordered for display. For example, suppose the buffer includes the following text (capital letters stand for right-to-left characters): abcABCxyz This would normally be displayed like this: abcCBAxyz Now imagine that we have an invisible property on characters C and x. The current code would skip C and x, and stop on y. But because C is encountered when moving backwards from C to A, that causes us to miss A and B entirely and display abcyz which is clearly incorrect. There are additional complications when(Continue reading)

RSS Feed