--- rxvt-unicode/src/command.C 2014/04/29 13:10:06 1.548 +++ rxvt-unicode/src/command.C 2014/05/11 06:38:39 1.549 @@ -4040,7 +4040,10 @@ } /*}}} */ -/* ------------------------------------------------------------------------- */ +/* ---------------------------------------------------------------------- */ +/* Write data to the pty as typed by the user, pasted with the mouse, + * or generated by us in response to a query ESC sequence. + */ /* * Send printf () formatted output to the command. @@ -4062,6 +4065,9 @@ void rxvt_term::tt_write_user_input (const char *data, unsigned int len) { + if (HOOK_INVOKE ((this, HOOK_TT_WRITE, DT_STR_LEN, data, len, DT_END))) + return; + if (option (Opt_scrollTtyKeypress)) if (view_start) { @@ -4069,21 +4075,23 @@ want_refresh = 1; } - tt_write (data, len); + tt_write_ (data, len); } -/* ---------------------------------------------------------------------- */ -/* Write data to the pty as typed by the user, pasted with the mouse, - * or generated by us in response to a query ESC sequence. - */ -static const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT - void rxvt_term::tt_write (const char *data, unsigned int len) { if (HOOK_INVOKE ((this, HOOK_TT_WRITE, DT_STR_LEN, data, len, DT_END))) return; + tt_write_ (data, len); +} + +static const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT + +void +rxvt_term::tt_write_ (const char *data, unsigned int len) +{ if (pty->pty < 0) return;