From a9d89d083ac5bf0b9fd5568d42e565aba0b6e13f Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@neverwas.me> Date: Mon, 21 Mar 2022 19:21:57 -0700 Subject: Fix regression in erc-send-input-line * lisp/erc/erc.el (erc-send-input-line): Restore remedial single-space padding to ensure empty messages typed at the prompt without an explicit /msg aren't rejected by the server. This behavior is only noticeable when `erc-send-whitespace-lines' is active. * test/lisp/erc/erc-tests.el (erc-process-input-line): Add trailing newline to more correctly simulate how it's actually called by `erc-send-input'. (Bug#50008) --- lisp/erc/erc.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/erc/erc.el') diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 1c221a9cb13..971d3f426fc 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -2992,6 +2992,8 @@ for special purposes (see erc-dcc.el).") (defun erc-send-input-line (target line &optional force) "Send LINE to TARGET." + (when (string= line "\n") + (setq line " \n")) (erc-message "PRIVMSG" (concat target " " line) force)) (defun erc-get-arglist (fun) -- cgit v1.2.3