int bracketedpaste(char **args) { char *pbuf = bracketedstring(); if (*args) { setsparam(*args, pbuf); } else { int n; ZLE_STRING_T wpaste; wpaste = stringaszleline((zmult == 1) ? pbuf : quotestring(pbuf, NULL, QT_SINGLE_OPTIONAL), 0, &n, NULL, NULL); cuttext(wpaste, n, CUT_REPLACE); if (!(zmod.flags & MOD_VIBUF)) { kct = -1; kctbuf = &cutbuf; zmult = 1; if (region_active) killregion(zlenoargs); yankcs = yankb = zlecs; doinsert(wpaste, n); yanke = zlecs; } free(pbuf); free(wpaste); } return 0; }
mod_export int selfinsert(UNUSED(char **args)) { ZLE_CHAR_T tmp; #ifdef MULTIBYTE_SUPPORT if (!lastchar_wide_valid) if (getrestchar(lastchar) == WEOF) return 1; #endif tmp = LASTFULLCHAR; doinsert(&tmp, 1); return 0; }
mod_export int selfinsert(UNUSED(char **args)) { ZLE_CHAR_T tmp; #ifdef MULTIBYTE_SUPPORT /* may be redundant with getkeymapcmd(), but other widgets call here too */ if (!lastchar_wide_valid) if (getrestchar(lastchar, NULL, NULL) == WEOF) return 1; #endif tmp = LASTFULLCHAR; doinsert(&tmp, 1); return 0; }