aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-03-23 09:21:41 +0100
committerThomas White <taw@bitwiz.org.uk>2015-03-23 09:21:41 +0100
commit209d222f39640c43225c86f5c607a66a1b428ca0 (patch)
tree3ca3e28080bfddbea589b997e863eae8de377cc6
parent8727537dcfd9bb6b834157cb3c3185fca8cc8a6d (diff)
Add WRAP_BOX_CALLBACK in various switches
-rw-r--r--src/wrap.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wrap.c b/src/wrap.c
index 6a4b7aa..6559dc3 100644
--- a/src/wrap.c
+++ b/src/wrap.c
@@ -158,6 +158,12 @@ void get_cursor_pos(struct wrap_box *box, int pos,
} /* else zero */
break;
+ case WRAP_BOX_CALLBACK :
+ if ( pos > 0 ) {
+ *xposd += pango_units_to_double(box->width);
+ }
+ break;
+
case WRAP_BOX_NOTHING :
case WRAP_BOX_SENTINEL :
*xposd = 0.0;
@@ -254,6 +260,7 @@ void find_cursor(struct frame *fr, double xposd, double yposd,
case WRAP_BOX_NOTHING:
case WRAP_BOX_SENTINEL:
case WRAP_BOX_IMAGE:
+ case WRAP_BOX_CALLBACK:
offs = 0;
break;
@@ -269,6 +276,11 @@ void find_cursor(struct frame *fr, double xposd, double yposd,
offs = idx + trail;
break;
+ default:
+ fprintf(stderr, "find_cursor(): box %i\n", b->type);
+ offs = 0;
+ break;
+
}
*pos = offs;
@@ -759,6 +771,9 @@ void wrap_line_free(struct wrap_line *l)
case WRAP_BOX_IMAGE :
break;
+ case WRAP_BOX_CALLBACK :
+ break;
+
case WRAP_BOX_NOTHING :
case WRAP_BOX_SENTINEL :
break;