summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--pango/pango-layout.c12
2 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index cd52a5c6..ba589110 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-08-09 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 465174 – TextView is ignoring multiple consecutive \t's
+
+ * pango/pango-layout.c (get_tab_pos), (shape_tab): Fix two problems
+ introduced with fix for bug 464183. The code now semantically
+ matches what it was before changes leading to revision 1734 for
+ the case that user has set no tabs.
+
2007-08-08 Behdad Esfahbod <behdad@gnome.org>
* docs/check.docs: Fix typo.
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 843e4fde..02e27db3 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -2823,18 +2823,19 @@ get_tab_pos (PangoLayout *layout, int index, gboolean *is_default)
gint n_tabs;
gboolean in_pixels;
- if (is_default)
- *is_default = FALSE;
-
if (layout->tabs)
{
n_tabs = pango_tab_array_get_size (layout->tabs);
in_pixels = pango_tab_array_get_positions_in_pixels (layout->tabs);
+ if (is_default)
+ *is_default = FALSE;
}
else
{
n_tabs = 0;
in_pixels = FALSE;
+ if (is_default)
+ *is_default = TRUE;
}
if (index < n_tabs)
@@ -2886,9 +2887,6 @@ get_tab_pos (PangoLayout *layout, int index, gboolean *is_default)
{
/* No tab array set, so use default tab width
*/
- if (is_default)
- *is_default = FALSE;
-
return layout->tab_width * index;
}
}
@@ -2944,7 +2942,7 @@ shape_tab (PangoLayoutLine *line,
* tab positions. If use has set tab positions, respect it to
* the pixel.
*/
- if (tab_pos >= current_width + (is_default ? space_width : 0))
+ if (tab_pos >= current_width + (is_default ? space_width : 1))
{
glyphs->glyphs[0].geometry.width = tab_pos - current_width;
break;