if (display)
{
selection_clear ();
+ selection_clear (true);
#ifdef USE_XIM
im_destroy ();
free (allocated [i]);
free (selection.text);
+ free (selection.clip_text);
// TODO: manage env vars in child only(!)
free (env_display);
free (env_term);
if (text)
{
- void *str;
+ wchar_t *str;
if (!text->encoding_is_wchar && text->string.multi_byte)
{
if (term->rs[Rs_imLocale])
SET_LOCALE (term->rs[Rs_imLocale]);
- str = rxvt_temp_buf ((text->length + 1) * sizeof (wchar_t));
- mbstowcs ((wchar_t *)str, text->string.multi_byte, text->length + 1);
+ str = rxvt_temp_buf<wchar_t> (text->length + 1);
+ mbstowcs (str, text->string.multi_byte, text->length + 1);
if (term->rs[Rs_imLocale])
SET_LOCALE (term->locale);
}
else
- str = (void *)text->string.wide_char;
+ str = text->string.wide_char;
HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW,
DT_INT, call_data->caret,