Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 927249 Details for
Bug 1130512
italic support backported from vte3
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch fixed
vte-0.28.2-italic.patch (text/plain), 20.50 KB, created by
Alexey Radkov
on 2014-08-15 19:46:16 UTC
(
hide
)
Description:
patch fixed
Filename:
MIME Type:
Creator:
Alexey Radkov
Created:
2014-08-15 19:46:16 UTC
Size:
20.50 KB
patch
obsolete
>diff -ur vte-0.28.2/src/vte.c vte-0.28.2.new/src/vte.c >--- vte-0.28.2/src/vte.c 2011-08-29 01:31:45.000000000 +0400 >+++ vte-0.28.2.new/src/vte.c 2014-08-15 23:30:25.643890352 +0400 >@@ -673,6 +673,7 @@ > { > const VteRowData *row_data; > int columns; >+ guint style; > > if (G_UNLIKELY (! gtk_widget_is_drawable (&terminal->widget) > || terminal->pvt->invalidated_all)) { >@@ -689,11 +690,11 @@ > cell = _vte_row_data_get (row_data, --col); > } > columns = cell->attr.columns; >+ style = _vte_draw_get_style(cell->attr.bold, cell->attr.italic); > if (cell->c != 0 && > _vte_draw_get_char_width ( > terminal->pvt->draw, >- cell->c, >- columns, cell->attr.bold) > >+ cell->c, columns, style) > > terminal->char_width * columns) { > columns++; > } >@@ -717,6 +718,7 @@ > gssize preedit_width; > glong column, row; > gint columns; >+ guint style; > > if (terminal->pvt->invalidated_all) { > return; >@@ -739,11 +741,12 @@ > cell = vte_terminal_find_charcell(terminal, column, row); > if (cell != NULL) { > columns = cell->attr.columns; >+ style = _vte_draw_get_style(cell->attr.bold, cell->attr.italic); > if (cell->c != 0 && > _vte_draw_get_char_width ( > terminal->pvt->draw, > cell->c, >- columns, cell->attr.bold) > >+ columns, style) > > terminal->char_width * columns) { > columns++; > } >@@ -9303,12 +9306,6 @@ > } > return FALSE; > } >-static gboolean >-vte_terminal_unichar_is_local_graphic(VteTerminal *terminal, vteunistr c, gboolean bold) >-{ >- return vte_unichar_is_local_graphic (c) && >- !_vte_draw_has_char (terminal->pvt->draw, c, bold); >-} > > static void > vte_terminal_fill_rectangle(VteTerminal *terminal, >@@ -9373,7 +9370,7 @@ > guint fore, guint back, gboolean draw_default_bg, > gint x, gint y, > gint column_width, gint columns, gint row_height, >- gboolean bold) >+ guint style) > { > gboolean ret; > gint xcenter, xright, ycenter, ybottom, i; >@@ -9397,7 +9394,7 @@ > } > > if (_vte_draw_char(terminal->pvt->draw, &request, >- &terminal->pvt->palette[fore], VTE_DRAW_OPAQUE, bold)) { >+ &terminal->pvt->palette[fore], VTE_DRAW_OPAQUE, style)) { > /* We were able to draw with actual fonts. */ > return TRUE; > } >@@ -10133,7 +10130,7 @@ > struct _vte_draw_text_request *items, gssize n, > guint fore, guint back, gboolean clear, > gboolean draw_default_bg, >- gboolean bold, gboolean underline, >+ gboolean bold, gboolean italic, gboolean underline, > gboolean strikethrough, gboolean hilite, gboolean boxed, > gint column_width, gint row_height) > { >@@ -10174,17 +10171,19 @@ > columns += items[i].columns; > } > if (clear && (draw_default_bg || bg != defbg)) { >+ gint bold_offset = _vte_draw_has_bold(terminal->pvt->draw, >+ VTE_DRAW_BOLD) ? 0 : bold; > _vte_draw_fill_rectangle(terminal->pvt->draw, > x + terminal->pvt->inner_border.left, > y + terminal->pvt->inner_border.top, >- columns * column_width + bold, >- row_height, >+ columns * column_width + bold_offset, row_height, > bg, VTE_DRAW_OPAQUE); > } > } while (i < n); > _vte_draw_text(terminal->pvt->draw, > items, n, >- fg, VTE_DRAW_OPAQUE, bold); >+ fg, VTE_DRAW_OPAQUE, >+ _vte_draw_get_style(bold, italic)); > for (i = 0; i < n; i++) { > /* Deadjust for the border. */ > items[i].x -= terminal->pvt->inner_border.left; >@@ -10491,6 +10490,7 @@ > back, > TRUE, draw_default_bg, > cells[j].attr.bold, >+ cells[j].attr.italic, > cells[j].attr.underline, > cells[j].attr.strikethrough, > FALSE, FALSE, column_width, height); >@@ -10515,8 +10515,9 @@ > gint i, j, row, rows, x, y, end_column; > guint fore, nfore, back, nback; > glong delta; >- gboolean underline, nunderline, bold, nbold, hilite, nhilite, >+ gboolean underline, nunderline, bold, nbold, italic, nitalic, hilite, nhilite, > selected, nselected, strikethrough, nstrikethrough; >+ guint style; > guint item_count; > const VteCell *cell; > const VteRowData *row_data; >@@ -10576,11 +10577,13 @@ > j += cell ? cell->attr.columns : 1; > } > if (back != VTE_DEF_BG) { >+ gint bold_offset = _vte_draw_has_bold(terminal->pvt->draw, >+ VTE_DRAW_BOLD) ? 0 : bold; > _vte_draw_fill_rectangle ( > terminal->pvt->draw, > x + i * column_width, > y, >- (j - i) * column_width + bold, >+ (j - i) * column_width + bold_offset, > row_height, > &terminal->pvt->palette[back], VTE_DRAW_OPAQUE); > } >@@ -10662,6 +10665,7 @@ > underline = cell->attr.underline; > strikethrough = cell->attr.strikethrough; > bold = cell->attr.bold; >+ italic = cell->attr.italic; > if (terminal->pvt->show_match) { > hilite = vte_cell_is_between(i, row, > terminal->pvt->match_start.col, >@@ -10678,9 +10682,10 @@ > items[0].x = start_x + i * column_width; > items[0].y = y; > j = i + items[0].columns; >+ style = _vte_draw_get_style(bold, italic); > > /* If this is a graphics character, draw it locally. */ >- if (vte_terminal_unichar_is_local_graphic(terminal, cell->c, cell->attr.bold)) { >+ if (vte_unichar_is_local_graphic(cell->c)) { > if (vte_terminal_draw_graphic(terminal, > items[0].c, > fore, back, >@@ -10690,7 +10695,7 @@ > column_width, > items[0].columns, > row_height, >- cell->attr.bold)) { >+ style)) { > i = j; > continue; > } >@@ -10729,7 +10734,7 @@ > selected = vte_cell_is_selected(terminal, j, row, NULL); > vte_terminal_determine_colors(terminal, cell, selected, &nfore, &nback); > /* Graphic characters must be drawn individually. */ >- if (vte_terminal_unichar_is_local_graphic(terminal, cell->c, cell->attr.bold)) { >+ if (vte_unichar_is_local_graphic(cell->c)) { > if (vte_terminal_draw_graphic(terminal, > cell->c, > nfore, nback, >@@ -10739,7 +10744,7 @@ > column_width, > cell->attr.columns, > row_height, >- cell->attr.bold)) { >+ style)) { > > j += cell->attr.columns; > continue; >@@ -10752,6 +10757,10 @@ > if (nbold != bold) { > break; > } >+ nitalic = cell->attr.italic; >+ if (nitalic != italic) { >+ break; >+ } > /* Break up underlined/not-underlined text. */ > nunderline = cell->attr.underline; > if (nunderline != underline) { >@@ -10816,7 +10825,7 @@ > items, > item_count, > fore, back, FALSE, FALSE, >- bold, underline, >+ bold, italic, underline, > strikethrough, hilite, FALSE, > column_width, row_height); > item_count = 1; >@@ -10942,6 +10951,7 @@ > guint fore, back; > int x, y; > gboolean blink, selected, focus; >+ guint style; > > if (!terminal->pvt->cursor_visible) > return; >@@ -10977,9 +10987,11 @@ > item.x = col * width; > item.y = row * height; > cursor_width = item.columns * width; >+ style = cell ? _vte_draw_get_style(cell->attr.bold, cell->attr.italic) : 0; > if (cell && cell->c != 0) { >- gint cw = _vte_draw_get_char_width (terminal->pvt->draw, >- cell->c, cell->attr.columns, cell->attr.bold); >+ gint cw; >+ cw = _vte_draw_get_char_width (terminal->pvt->draw, cell->c, >+ cell->attr.columns, style); > cursor_width = MAX(cursor_width, cw); > } > >@@ -11024,7 +11036,7 @@ > x, y, > cursor_width, height); > >- if (!vte_terminal_unichar_is_local_graphic(terminal, item.c, cell ? cell->attr.bold : FALSE) || >+ if (!vte_unichar_is_local_graphic(item.c) || > !vte_terminal_draw_graphic(terminal, > item.c, > fore, back, >@@ -11034,7 +11046,7 @@ > width, > item.columns, > height, >- cell ? cell->attr.bold : FALSE)) { >+ style)) { > gboolean hilite = FALSE; > if (cell && terminal->pvt->show_match) { > hilite = vte_cell_is_between(col, row, >@@ -11049,6 +11061,7 @@ > &item, 1, > fore, back, TRUE, FALSE, > cell->attr.bold, >+ cell->attr.italic, > cell->attr.underline, > cell->attr.strikethrough, > hilite, >@@ -11146,6 +11159,7 @@ > FALSE, > FALSE, > FALSE, >+ FALSE, > FALSE, > TRUE, > width, height); >diff -ur vte-0.28.2/src/vtedraw.c vte-0.28.2.new/src/vtedraw.c >--- vte-0.28.2/src/vtedraw.c 2011-08-17 01:52:48.000000000 +0400 >+++ vte-0.28.2.new/src/vtedraw.c 2014-08-15 23:22:36.498403573 +0400 >@@ -744,13 +744,21 @@ > return uinfo; > } > >+guint _vte_draw_get_style(gboolean bold, gboolean italic) { >+ guint style = 0; >+ if (bold) >+ style |= VTE_DRAW_BOLD; >+ if (italic) >+ style |= VTE_DRAW_ITALIC; >+ return style; >+} >+ > struct _vte_draw { > GtkWidget *widget; > > gint started; > >- struct font_info *font; >- struct font_info *font_bold; >+ struct font_info *fonts[4]; > cairo_pattern_t *bg_pattern; > > cairo_t *cr; >@@ -773,6 +781,7 @@ > void > _vte_draw_free (struct _vte_draw *draw) > { >+ gint style; > _vte_debug_print (VTE_DEBUG_DRAW, "draw_free\n"); > > if (draw->bg_pattern != NULL) { >@@ -780,9 +789,13 @@ > draw->bg_pattern = NULL; > } > >- if (draw->font != NULL) { >- font_info_destroy (draw->font); >- draw->font = NULL; >+ /* Free all fonts (make sure to destroy every font only once)*/ >+ for (style = 3; style >= 0; style--) { >+ if (draw->fonts[style] != NULL && >+ (style == 0 || draw->fonts[style] != draw->fonts[style-1])) { >+ font_info_destroy (draw->fonts[style]); >+ draw->fonts[style] = NULL; >+ } > } > > if (draw->widget != NULL) { >@@ -915,29 +928,68 @@ > const PangoFontDescription *fontdesc, > VteTerminalAntiAlias antialias) > { >- PangoFontDescription *bolddesc = NULL; >+ PangoFontDescription *bolddesc = NULL; >+ PangoFontDescription *italicdesc = NULL; >+ PangoFontDescription *bolditalicdesc = NULL; >+ gint style, normal, bold, ratio; > > _vte_debug_print (VTE_DEBUG_DRAW, "draw_set_text_font (aa=%d)\n", > antialias); > >- if (draw->font_bold != draw->font) >- font_info_destroy (draw->font_bold); >- font_info_destroy (draw->font); >- draw->font = font_info_create_for_widget (draw->widget, fontdesc, antialias); >+ /* Free all fonts (make sure to destroy every font only once)*/ >+ for (style = 3; style >= 0; style--) { >+ if (draw->fonts[style] != NULL && >+ (style == 0 || draw->fonts[style] != draw->fonts[style-1])) { >+ font_info_destroy (draw->fonts[style]); >+ draw->fonts[style] = NULL; >+ } >+ } > > /* calculate bold font desc */ > bolddesc = pango_font_description_copy (fontdesc); > pango_font_description_set_weight (bolddesc, PANGO_WEIGHT_BOLD); > >- draw->font_bold = font_info_create_for_widget (draw->widget, bolddesc, antialias); >+ /* calculate italic font desc */ >+ italicdesc = pango_font_description_copy (fontdesc); >+ pango_font_description_set_style (italicdesc, PANGO_STYLE_ITALIC); >+ >+ /* calculate bold italic font desc */ >+ bolditalicdesc = pango_font_description_copy (bolddesc); >+ pango_font_description_set_style (bolditalicdesc, PANGO_STYLE_ITALIC); >+ >+ draw->fonts[VTE_DRAW_NORMAL] = font_info_create_for_widget (draw->widget, >+ fontdesc, antialias); >+ draw->fonts[VTE_DRAW_BOLD] = font_info_create_for_widget (draw->widget, >+ bolddesc, antialias); >+ draw->fonts[VTE_DRAW_ITALIC] = font_info_create_for_widget (draw->widget, >+ italicdesc, antialias); >+ draw->fonts[VTE_DRAW_ITALIC | VTE_DRAW_BOLD] = >+ font_info_create_for_widget (draw->widget, >+ bolditalicdesc, antialias); > pango_font_description_free (bolddesc); >+ pango_font_description_free (italicdesc); >+ pango_font_description_free (bolditalicdesc); > > /* Decide if we should keep this bold font face, per bug 54926: > * - reject bold font if it is not within 10% of normal font width > */ >- if ( abs((draw->font_bold->width * 100 / draw->font->width) - 100) > 10 ) { >- font_info_destroy (draw->font_bold); >- draw->font_bold = draw->font; >+ normal = VTE_DRAW_NORMAL; >+ bold = normal | VTE_DRAW_BOLD; >+ ratio = draw->fonts[bold]->width * 100 / draw->fonts[normal]->width; >+ if (abs(ratio - 100) > 10) { >+ _vte_debug_print (VTE_DEBUG_DRAW, >+ "Rejecting bold font (%i%%).\n", ratio); >+ font_info_destroy (draw->fonts[bold]); >+ draw->fonts[bold] = draw->fonts[normal]; >+ } >+ normal = VTE_DRAW_ITALIC; >+ bold = normal | VTE_DRAW_BOLD; >+ ratio = draw->fonts[bold]->width * 100 / draw->fonts[normal]->width; >+ if (abs(ratio - 100) > 10) { >+ _vte_debug_print (VTE_DEBUG_DRAW, >+ "Rejecting italic bold font (%i%%).\n", ratio); >+ font_info_destroy (draw->fonts[bold]); >+ draw->fonts[bold] = draw->fonts[normal]; > } > } > >@@ -945,33 +997,33 @@ > _vte_draw_get_text_metrics(struct _vte_draw *draw, > gint *width, gint *height, gint *ascent) > { >- g_return_if_fail (draw->font != NULL); >+ g_return_if_fail (draw->fonts[VTE_DRAW_NORMAL] != NULL); > > if (width) >- *width = draw->font->width; >+ *width = draw->fonts[VTE_DRAW_NORMAL]->width; > if (height) >- *height = draw->font->height; >+ *height = draw->fonts[VTE_DRAW_NORMAL]->height; > if (ascent) >- *ascent = draw->font->ascent; >+ *ascent = draw->fonts[VTE_DRAW_NORMAL]->ascent; > } > > > int > _vte_draw_get_char_width (struct _vte_draw *draw, vteunistr c, int columns, >- gboolean bold) >+ guint style) > { > struct unistr_info *uinfo; > >- g_return_val_if_fail (draw->font != NULL, 0); >+ g_return_val_if_fail (draw->fonts[VTE_DRAW_NORMAL] != NULL, 0); > >- uinfo = font_info_get_unistr_info (bold ? draw->font_bold : draw->font, c); >+ uinfo = font_info_get_unistr_info (draw->fonts[style], c); > return uinfo->width; > } > >-static gboolean >-_vte_draw_has_bold (struct _vte_draw *draw) >+gboolean >+_vte_draw_has_bold (struct _vte_draw *draw, guint style) > { >- return (draw->font != draw->font_bold); >+ return (draw->fonts[style ^ VTE_DRAW_BOLD] != draw->fonts[style]); > } > > static void >@@ -989,13 +1041,13 @@ > static void > _vte_draw_text_internal (struct _vte_draw *draw, > struct _vte_draw_text_request *requests, gsize n_requests, >- const PangoColor *color, guchar alpha, gboolean bold) >+ const PangoColor *color, guchar alpha, guint style) > { > gsize i; > cairo_scaled_font_t *last_scaled_font = NULL; > int n_cr_glyphs = 0; > cairo_glyph_t cr_glyphs[MAX_RUN_LENGTH]; >- struct font_info *font = bold ? draw->font_bold : draw->font; >+ struct font_info *font = draw->fonts[style]; > > g_return_if_fail (font != NULL); > >@@ -1055,7 +1107,7 @@ > void > _vte_draw_text (struct _vte_draw *draw, > struct _vte_draw_text_request *requests, gsize n_requests, >- const PangoColor *color, guchar alpha, gboolean bold) >+ const PangoColor *color, guchar alpha, guint style) > { > g_return_if_fail (draw->started); > >@@ -1067,16 +1119,17 @@ > g_string_append_unichar (string, requests[n].c); > } > str = g_string_free (string, FALSE); >- g_printerr ("draw_text (\"%s\", len=%"G_GSIZE_FORMAT", color=(%d,%d,%d,%d), %s)\n", >- str, n_requests, color->red, color->green, color->blue, >- alpha, bold ? "bold" : "normal"); >+ g_printerr ("draw_text (\"%s\", len=%"G_GSIZE_FORMAT", color=(%d,%d,%d,%d), %s - %s)\n", >+ str, n_requests, color->red, color->green, color->blue, alpha, >+ (style & VTE_DRAW_BOLD) ? "bold" : "normal", >+ (style & VTE_DRAW_ITALIC) ? "italic" : "regular"); > g_free (str); > } > >- _vte_draw_text_internal (draw, requests, n_requests, color, alpha, bold); >+ _vte_draw_text_internal (draw, requests, n_requests, color, alpha, style); > > /* handle fonts that lack a bold face by double-striking */ >- if (bold && !_vte_draw_has_bold (draw)) { >+ if ((style & VTE_DRAW_BOLD) && !_vte_draw_has_bold (draw, style)) { > gsize i; > > /* Take a step to the right. */ >@@ -1084,7 +1137,7 @@ > requests[i].x++; > } > _vte_draw_text_internal (draw, requests, >- n_requests, color, alpha, FALSE); >+ n_requests, color, alpha, style); > /* Now take a step back. */ > for (i = 0; i < n_requests; i++) { > requests[i].x--; >@@ -1093,35 +1146,38 @@ > } > > gboolean >-_vte_draw_has_char (struct _vte_draw *draw, vteunistr c, gboolean bold) >+_vte_draw_has_char (struct _vte_draw *draw, vteunistr c, guint style) > { > struct unistr_info *uinfo; > >- _vte_debug_print (VTE_DEBUG_DRAW, "draw_has_char ('0x%04X', %s)\n", c, >- bold ? "bold" : "normal"); >+ _vte_debug_print (VTE_DEBUG_DRAW, "draw_has_char ('0x%04X', %s - %s)\n", c, >+ (style & VTE_DRAW_BOLD) ? "bold" : "normal", >+ (style & VTE_DRAW_ITALIC) ? "italic" : "regular"); > >- g_return_val_if_fail (draw->font != NULL, FALSE); >+ g_return_val_if_fail (draw->fonts[VTE_DRAW_NORMAL] != NULL, FALSE); > >- uinfo = font_info_get_unistr_info (bold ? draw->font_bold : draw->font, c); >+ uinfo = font_info_get_unistr_info (draw->fonts[style], c); > return !uinfo->has_unknown_chars; > } > > gboolean > _vte_draw_char (struct _vte_draw *draw, > struct _vte_draw_text_request *request, >- const PangoColor *color, guchar alpha, gboolean bold) >+ const PangoColor *color, guchar alpha, guint style) > { > gboolean has_char; > > _vte_debug_print (VTE_DEBUG_DRAW, >- "draw_char ('%c', color=(%d,%d,%d,%d), %s)\n", >+ "draw_char ('%c', color=(%d,%d,%d,%d), %s, %s)\n", > request->c, > color->red, color->green, color->blue, >- alpha, bold ? "bold" : "normal"); >+ alpha, >+ (style & VTE_DRAW_BOLD) ? "bold" : "normal", >+ (style & VTE_DRAW_ITALIC) ? "italic" : "regular"); > >- has_char =_vte_draw_has_char (draw, request->c, bold); >+ has_char =_vte_draw_has_char (draw, request->c, style); > if (has_char) >- _vte_draw_text (draw, request, 1, color, alpha, bold); >+ _vte_draw_text (draw, request, 1, color, alpha, style); > > return has_char; > } >diff -ur vte-0.28.2/src/vtedraw.h vte-0.28.2.new/src/vtedraw.h >--- vte-0.28.2/src/vtedraw.h 2011-08-17 01:52:48.000000000 +0400 >+++ vte-0.28.2.new/src/vtedraw.h 2014-08-15 23:22:36.499403610 +0400 >@@ -49,6 +49,10 @@ > #define VTE_DRAW_OPAQUE 0xff > #define VTE_DRAW_MAX_LENGTH 1024 > >+#define VTE_DRAW_NORMAL 0 >+#define VTE_DRAW_BOLD 1 >+#define VTE_DRAW_ITALIC 2 >+ > struct _vte_draw; > > /* A request to draw a particular character spanning a given number of columns >@@ -60,6 +64,8 @@ > gshort x, y, columns; > }; > >+guint _vte_draw_get_style(gboolean bold, gboolean italic); >+ > /* Create and destroy a draw structure. */ > struct _vte_draw *_vte_draw_new(GtkWidget *widget); > void _vte_draw_free(struct _vte_draw *draw); >@@ -93,15 +99,16 @@ > void _vte_draw_get_text_metrics(struct _vte_draw *draw, > gint *width, gint *height, gint *ascent); > int _vte_draw_get_char_width(struct _vte_draw *draw, vteunistr c, int columns, >- gboolean bold); >+ guint style); >+gboolean _vte_draw_has_bold (struct _vte_draw *draw, guint style); > > void _vte_draw_text(struct _vte_draw *draw, > struct _vte_draw_text_request *requests, gsize n_requests, >- const PangoColor *color, guchar alpha, gboolean); >+ const PangoColor *color, guchar alpha, guint style); > gboolean _vte_draw_char(struct _vte_draw *draw, > struct _vte_draw_text_request *request, >- const PangoColor *color, guchar alpha, gboolean bold); >-gboolean _vte_draw_has_char(struct _vte_draw *draw, vteunistr c, gboolean bold); >+ const PangoColor *color, guchar alpha, guint style); >+gboolean _vte_draw_has_char(struct _vte_draw *draw, vteunistr c, guint style); > > > void _vte_draw_fill_rectangle(struct _vte_draw *draw, >diff -ur vte-0.28.2/src/vterowdata.h vte-0.28.2.new/src/vterowdata.h >--- vte-0.28.2/src/vterowdata.h 2011-08-17 01:52:48.000000000 +0400 >+++ vte-0.28.2.new/src/vterowdata.h 2014-08-15 23:22:36.500403648 +0400 >@@ -40,6 +40,8 @@ > * > * Ordered by most commonly changed attributes, to > * optimize the compact representation. >+ * >+ * When adding new attributes, remember to update basic_cell below too. > */ > > typedef struct _VteCellAttr { >@@ -50,6 +52,7 @@ > Keep at least 4 for tabs to work > */ > guint32 bold: 1; >+ guint32 italic: 1; > guint32 fore: 9; /* Index into color palette */ > guint32 back: 9; /* Index into color palette. */ > >@@ -62,11 +65,6 @@ > guint32 half: 1; > > guint32 invisible: 1; >- /* unused; bug 499893 >- guint32 protect: 1; >- */ >- >- /* 30 bits */ > } VteCellAttr; > G_STATIC_ASSERT (sizeof (VteCellAttr) == 4); > >@@ -102,6 +100,7 @@ > 0, /* fragment */ > 1, /* columns */ > 0, /* bold */ >+ 0, /* italic */ > VTE_DEF_FG, /* fore */ > VTE_DEF_BG, /* back */ > >diff -ur vte-0.28.2/src/vteseq.c vte-0.28.2.new/src/vteseq.c >--- vte-0.28.2/src/vteseq.c 2011-08-17 01:52:48.000000000 +0400 >+++ vte-0.28.2.new/src/vteseq.c 2014-08-15 23:22:36.504403797 +0400 >@@ -2291,6 +2291,9 @@ > terminal->pvt->screen->defaults.attr.half = 1; > terminal->pvt->screen->defaults.attr.bold = 0; > break; >+ case 3: >+ terminal->pvt->screen->defaults.attr.italic = 1; >+ break; > case 4: > terminal->pvt->screen->defaults.attr.underline = 1; > break; >@@ -2311,6 +2314,9 @@ > terminal->pvt->screen->defaults.attr.bold = 0; > terminal->pvt->screen->defaults.attr.half = 0; > break; >+ case 23: >+ terminal->pvt->screen->defaults.attr.italic = 0; >+ break; > case 24: > terminal->pvt->screen->defaults.attr.underline = 0; > break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1130512
:
927079
| 927249