comparison src/xdisp.c @ 109891:373abedd1f02

merge from upstream
author joakim@verona.se
date Fri, 20 Aug 2010 22:00:00 +0200
parents b6004420857b
children 4083ea4ca585 5a930b6b595e
comparison
equal deleted inserted replaced
109888:fd080c6fcd86 109891:373abedd1f02
215 well, empty. On text terminals, these special glyphs are simply 215 well, empty. On text terminals, these special glyphs are simply
216 blank characters. On graphics terminals, there's a single stretch 216 blank characters. On graphics terminals, there's a single stretch
217 glyph with suitably computed width. Both the blanks and the 217 glyph with suitably computed width. Both the blanks and the
218 stretch glyph are given the face of the background of the line. 218 stretch glyph are given the face of the background of the line.
219 This way, the terminal-specific back-end can still draw the glyphs 219 This way, the terminal-specific back-end can still draw the glyphs
220 left to right, even for R2L lines. */ 220 left to right, even for R2L lines.
221
222 Note one important detail mentioned above: that the bidi reordering
223 engine, driven by the iterator, produces characters in R2L rows
224 starting at the character that will be the rightmost on display.
225 As far as the iterator is concerned, the geometry of such rows is
226 still left to right, i.e. the iterator "thinks" the first character
227 is at the leftmost pixel position. The iterator does not know that
228 PRODUCE_GLYPHS reverses the order of the glyphs that the iterator
229 delivers. This is important when functions from the the move_it_*
230 family are used to get to certain screen position or to match
231 screen coordinates with buffer coordinates: these functions use the
232 iterator geometry, which is left to right even in R2L paragraphs.
233 This works well with most callers of move_it_*, because they need
234 to get to a specific column, and columns are still numbered in the
235 reading order, i.e. the rightmost character in a R2L paragraph is
236 still column zero. But some callers do not get well with this; a
237 notable example is mouse clicks that need to find the character
238 that corresponds to certain pixel coordinates. See
239 buffer_posn_from_coords in dispnew.c for how this is handled. */
221 240
222 #include <config.h> 241 #include <config.h>
223 #include <stdio.h> 242 #include <stdio.h>
224 #include <limits.h> 243 #include <limits.h>
225 #include <setjmp.h> 244 #include <setjmp.h>