pango r2688 - in trunk: . pango
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: pango r2688 - in trunk: . pango
- Date: Mon, 11 Aug 2008 18:17:23 +0000 (UTC)
Author: behdad
Date: Mon Aug 11 18:17:23 2008
New Revision: 2688
URL: http://svn.gnome.org/viewvc/pango?rev=2688&view=rev
Log:
2008-08-11 Behdad Esfahbod <behdad gnome org>
Bug 547303 â pango_layout_get_cursor_pos crashes on certain text
buffers
* pango/pango-layout.c (pango_layout_get_cursor_pos): Handle cursor
position in the middle of a "\r\n" cluster.
Modified:
trunk/ChangeLog
trunk/pango/pango-layout.c
Modified: trunk/pango/pango-layout.c
==============================================================================
--- trunk/pango/pango-layout.c (original)
+++ trunk/pango/pango-layout.c Mon Aug 11 18:17:23 2008
@@ -2194,6 +2194,14 @@
else
x1_trailing = line_rect.width;
}
+ else if (index >= layout_line->start_index + layout_line->length)
+ {
+ dir1 = layout_line->resolved_dir;
+ if (layout_line->resolved_dir == PANGO_DIRECTION_LTR)
+ x1_trailing = line_rect.width;
+ else
+ x1_trailing = 0;
+ }
else
{
gint prev_index = g_utf8_prev_char (layout->text + index) - layout->text;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]