[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101204: * nsterm.m (ns_draw_window_c
From: |
Jan D |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101204: * nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L. |
Date: |
Sun, 29 Aug 2010 12:30:45 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101204
committer: Jan D <address@hidden>
branch nick: trunk
timestamp: Sun 2010-08-29 12:30:45 +0200
message:
* nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L.
modified:
src/ChangeLog
src/nsterm.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-08-26 00:47:34 +0000
+++ b/src/ChangeLog 2010-08-29 10:30:45 +0000
@@ -1,3 +1,7 @@
+2010-08-29 Jan Djärv <address@hidden>
+
+ * nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L.
+
2010-08-26 Kenichi Handa <address@hidden>
* xdisp.c (compute_stop_pos): Pay attention to bidi scan direction
=== modified file 'src/nsterm.m'
--- a/src/nsterm.m 2010-08-18 08:06:45 +0000
+++ b/src/nsterm.m 2010-08-29 10:30:45 +0000
@@ -2251,6 +2251,11 @@
struct frame *f = WINDOW_XFRAME (w);
struct glyph *phys_cursor_glyph;
int overspill;
+ struct glyph *cursor_glyph;
+
+ /* If cursor is out of bounds, don't draw garbage. This can happen
+ in mini-buffer windows when switching between echo area glyphs
+ and mini-buffer. */
NSTRACE (dumpcursor);
//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 @@
case BAR_CURSOR:
s = r;
s.size.width = min (cursor_width, 2); //FIXME(see above)
+
+ /* If the character under cursor is R2L, draw the bar cursor
+ on the right of its glyph, rather than on the left. */
+ cursor_glyph = get_phys_cursor_glyph (w);
+ if ((cursor_glyph->resolved_level & 1) != 0)
+ s.origin.x += cursor_glyph->pixel_width - s.size.width;
+
NSRectFill (s);
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101204: * nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L.,
Jan D <=