diff options
| author | Jan D | 2010-08-29 12:30:45 +0200 |
|---|---|---|
| committer | Jan D | 2010-08-29 12:30:45 +0200 |
| commit | 4520b858c1d64bf61db1ae7b00b1b84e0cc645bd (patch) | |
| tree | de0a4caf7bc5a9b83b0ff8592d8e2afe25e39550 /src | |
| parent | e2046ecf21f7272f289297ddee897c19defcd0a4 (diff) | |
| download | emacs-4520b858c1d64bf61db1ae7b00b1b84e0cc645bd.tar.gz emacs-4520b858c1d64bf61db1ae7b00b1b84e0cc645bd.zip | |
* nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/nsterm.m | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8a3714bcf0d..b58557a944e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-08-29 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L. | ||
| 4 | |||
| 1 | 2010-08-26 Kenichi Handa <handa@m17n.org> | 5 | 2010-08-26 Kenichi Handa <handa@m17n.org> |
| 2 | 6 | ||
| 3 | * xdisp.c (compute_stop_pos): Pay attention to bidi scan direction | 7 | * xdisp.c (compute_stop_pos): Pay attention to bidi scan direction |
diff --git a/src/nsterm.m b/src/nsterm.m index 2eb84607562..f0efb948ab9 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -2251,6 +2251,11 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, | |||
| 2251 | struct frame *f = WINDOW_XFRAME (w); | 2251 | struct frame *f = WINDOW_XFRAME (w); |
| 2252 | struct glyph *phys_cursor_glyph; | 2252 | struct glyph *phys_cursor_glyph; |
| 2253 | int overspill; | 2253 | int overspill; |
| 2254 | struct glyph *cursor_glyph; | ||
| 2255 | |||
| 2256 | /* If cursor is out of bounds, don't draw garbage. This can happen | ||
| 2257 | in mini-buffer windows when switching between echo area glyphs | ||
| 2258 | and mini-buffer. */ | ||
| 2254 | 2259 | ||
| 2255 | NSTRACE (dumpcursor); | 2260 | NSTRACE (dumpcursor); |
| 2256 | //fprintf(stderr, "drawcursor (%d,%d) activep = %d\tonp = %d\tc_type = %d\twidth = %d\n",x,y, active_p,on_p,cursor_type,cursor_width); | 2261 | //fprintf(stderr, "drawcursor (%d,%d) activep = %d\tonp = %d\tc_type = %d\twidth = %d\n",x,y, active_p,on_p,cursor_type,cursor_width); |
| @@ -2328,6 +2333,13 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, | |||
| 2328 | case BAR_CURSOR: | 2333 | case BAR_CURSOR: |
| 2329 | s = r; | 2334 | s = r; |
| 2330 | s.size.width = min (cursor_width, 2); //FIXME(see above) | 2335 | s.size.width = min (cursor_width, 2); //FIXME(see above) |
| 2336 | |||
| 2337 | /* If the character under cursor is R2L, draw the bar cursor | ||
| 2338 | on the right of its glyph, rather than on the left. */ | ||
| 2339 | cursor_glyph = get_phys_cursor_glyph (w); | ||
| 2340 | if ((cursor_glyph->resolved_level & 1) != 0) | ||
| 2341 | s.origin.x += cursor_glyph->pixel_width - s.size.width; | ||
| 2342 | |||
| 2331 | NSRectFill (s); | 2343 | NSRectFill (s); |
| 2332 | break; | 2344 | break; |
| 2333 | } | 2345 | } |