diff options
author | Thomas White <taw@bitwiz.org.uk> | 2014-06-21 18:04:58 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2014-06-21 18:04:58 +0200 |
commit | 10d05eeeb2705c3918e27a98253e95a2d50fe189 (patch) | |
tree | 848ec0c2d7be583aff7b11815cb64dc079764a01 /src/wrap.c | |
parent | b36421467b4669dec503714bbf7be13fcfadc04e (diff) |
Mostly working cursor logic
Diffstat (limited to 'src/wrap.c')
-rw-r--r-- | src/wrap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -146,7 +146,7 @@ void get_cursor_pos(struct wrap_box *box, size_t pos, box_text = g_utf8_offset_to_pointer(block_text, box->offs_char); /* cast because this function is not const-clean */ pango_glyph_string_index_to_x(box->glyphs, (char *)box_text, - box->len_bytes, + strlen(box_text), &box->item->analysis, pos, FALSE, &p); *xposd += pango_units_to_double(p); @@ -311,7 +311,7 @@ void find_cursor(struct frame *fr, double xposd, double yposd, box_text = g_utf8_offset_to_pointer(block_text, b->offs_char); /* cast because this function is not const-clean */ pango_glyph_string_x_to_index(b->glyphs, (char *)box_text, - b->len_bytes, + strlen(box_text), &b->item->analysis, x_pos_i, &idx, &trail); offs = idx + trail; |