diff options
Diffstat (limited to 'amiga/clipboard.c')
-rwxr-xr-x | amiga/clipboard.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/amiga/clipboard.c b/amiga/clipboard.c index 314692731..a8122f1bd 100755 --- a/amiga/clipboard.c +++ b/amiga/clipboard.c @@ -330,6 +330,7 @@ void ami_drag_selection(struct selection *s) struct box *text_box; int x; int y; + char *utf8text; struct ami_text_selection *sel; struct IFFHandle *old_iffh = iffh; struct gui_window_2 *gwin = ami_window_at_pointer(); @@ -365,18 +366,22 @@ void ami_drag_selection(struct selection *s) { if(sel = ami_selection_to_text(gwin)) { + utf8text = ami_utf8_easy(sel->text); RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_URL], - gwin->win, NULL, STRINGA_TextVal, sel->text, TAG_DONE); + gwin->win, NULL, STRINGA_TextVal, utf8text, TAG_DONE); FreeVec(sel); + ami_utf8_free(utf8text); } } else if(ami_gadget_hit(gwin->objects[GID_SEARCHSTRING], x, y)) { if(sel = ami_selection_to_text(gwin)) { + utf8text = ami_utf8_easy(sel->text); RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_SEARCHSTRING], - gwin->win, NULL, STRINGA_TextVal, sel->text, TAG_DONE); + gwin->win, NULL, STRINGA_TextVal, utf8text, TAG_DONE); FreeVec(sel); + ami_utf8_free(utf8text); } } else |