1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-25 18:52:22 -05:00

Fix many many problems in xtext.c related to character width.

* Rework multiline logic to use a GSList, not an array
* Remove all multibyte booleans; everything is potentially multibyte
  - Except for gtk_xtext_get_word(), which needs special attention
* Enhance pango work for bold and italics (attr_list -> attr_lists[4])
* Enhance gtk_xtext_strip_color () to save bold, italics info
* Involve emphasis information in all pixel-width calculations
* Rework find_x () to account for emphasis info in widths

Closes #891
Fixes #872
This commit is contained in:
RichardHitt 2014-02-02 00:45:51 -08:00 committed by TingPing
parent 10d3c15143
commit 4c1fd3ee67
2 changed files with 378 additions and 321 deletions

File diff suppressed because it is too large Load Diff

View File

@ -74,7 +74,6 @@ typedef struct {
gfloat old_value; /* last known adj->value */
textentry *text_first;
textentry *text_last;
guint16 grid_offset[256];
textentry *last_ent_start; /* this basically describes the last rendered */
textentry *last_ent_end; /* selection. */
@ -98,7 +97,6 @@ typedef struct {
unsigned int time_stamp:1;
unsigned int scrollbar_down:1;
unsigned int needs_recalc:1;
unsigned int grid_dirty:1;
unsigned int marker_seen:1;
unsigned int reset_marker_pos:1;
@ -200,9 +198,7 @@ struct _GtkXText
int clip_y2; /* from y to y2 */
/* current text states */
unsigned int bold:1;
unsigned int underline:1;
unsigned int italics:1;
unsigned int hidden:1;
/* text parsing states */